资源简介
matlab开发-二维波动方程模拟。二维波动方程的有限差分数值解。
代码片段和文件信息
clc; clear all; close all;
%2D WAVE EQUATION utt = c^2(uxx+uyy)
%with initial condition u(xy0) = sin(p*pi*x)*sin(q*pi*y) 0 % and boundary conditions u(0yt) = u(1yt)= u(x0t)= u(x1t) = 0 t>0
c = 1;
dx = 0.01;
dy = dx;
sigma = 1/sqrt(2); gamma = 1/sqrt(2); %Courant-Friedrich Stability Condition
dt = sigma*(dx/c);
t = 0:dt:1; x = 0:dx:1; y = 0:dy:1;
u = zeros(length(x)length(y)length(t));
p = 2; q = 1;
u(::1) = transpose(sin(p.*pi.*x))*sin(q.*pi.*y); %u(xy0) = sin(p*pi*x)*sin(q*pi*y)
%u(xydt)
for i=2:length(x)-1
for j=2:length(y)-1
u(ij2)= (sigma^2)*(u(i+1j1)-2*u(ij1)+u(i-1j1))...
+(gamma^2)*(u(ij+11)-2*u(ij1)+u(ij-11))+2*u(ij1) - u(ij1);
end
end
for n=2:length(t)-1
for i=2:length(x
属性 大小 日期 时间 名称
----------- --------- ---------- ----- ----
文件 2123 2017-03-29 19:36 Wave_Equation_2D.m
文件 1314 2017-03-29 19:36 license.txt
- 上一篇:matlab开发-DTMF
- 下一篇:matlab开发-信号波的首次零交叉检测
相关资源
- matlab开发-电机磁轴承
- matlab开发-Treynorblackportfoliomanagement模型
- matlab开发-黑白图像增强器
- matlab开发-ResponseSpectra
- matlab开发-huashiyiqikeLSTMMATLAB
- matlab开发-HestonOptionPricer
- matlab开发-三相电压调节器
- matlab开发-单级电液伺服阀
-
matlab开发-iau2006 acioba
sedDusingXy系列 - matlab开发-带DPWM0调制的三相逆变器
- matlab开发-Earthquakesimulation
- matlab开发-带MPPT的住宅网格连接PVSys
- matlab开发-pplot
评论
共有 条评论