# 波偏微分方程的求解（2）

t = 0 :0.1:1;
x = 0:0.1:1;
L = 1
a = 1
for xi = x
u= sin(pi * xi / L) * cos(pi * a * t / L) + 0.5 *sin(3 * pi * xi / L) * cos(3 * pi * a * t / L);
plot (t, u);
hold on;
end


t = 0 :0.1:2;
x = 0:0.1:1;
L = 1
a = 1
for xi = x
u= sin(pi * xi / L) * cos(pi * a * t / L) + 0.5 *sin(3 * pi * xi / L) * cos(3 * pi * a * t / L);
plot (t, u);
hold on;
end


t = 0 :0.1:3;
x = 0:0.1:1;
L = 1
a = 1
for xi = x
u= sin(pi * xi / L) * cos(pi * a * t / L) + 0.5 *sin(3 * pi * xi / L) * cos(3 * pi * a * t / L);
plot (t, u);
hold on;
end


t = 0 :0.1:1;
x = 0:0.1:1;
L = 2
a = 1
for xi = x
u= sin(pi * xi / L) * cos(pi * a * t / L) + 0.5 *sin(3 * pi * xi / L) * cos(3 * pi * a * t / L);
plot (t, u);
hold on;
end


t = 0 :0.1:2;
x = 0:0.1:1;
L = 2
a = 1
for xi = x
u= sin(pi * xi / L) * cos(pi * a * t / L) + 0.5 *sin(3 * pi * xi / L) * cos(3 * pi * a * t / L);
plot (t, u);
hold on;
end


t = 0 :0.1:4;
x = 0:0.1:1;
L = 2
a = 1
for xi = x
u= sin(pi * xi / L) * cos(pi * a * t / L) + 0.5 *sin(3 * pi * xi / L) * cos(3 * pi * a * t / L);
plot (t, u);
hold on;
end


T h e   s o l u t i o n   i s   p e r i o d i c   i n   t i m e   w i t h   a   p e r i o d   o f   T = 2 L α The~solution ~is ~periodic ~in~ time~ with~ a~period ~of~ T=\frac{2L}{\alpha}

clear all,clc;
a=0:.01:1;
[x,t]=meshgrid(a);
u=0.5.*(sin(pi * (x+t)) + 0.5 * sin(3 * pi * (x+t))+sin(pi * (x-t)) + 0.5 * sin(3 * pi * (x-t)));
figure(1)
mesh(x,t,u);
axis([0 1 0 1 -1 1]);
title('u=0.5.*((x+t).*exp(-(x+t).^2)+(x-t).*exp(-(x-t).^2)); mesh')
colormap cool
colorbar


clear all,clc;
a=0:.01:2;
[x,t]=meshgrid(a);
u=0.5.*(sin(pi * (x+t)) + 0.5 * sin(3 * pi * (x+t))+sin(pi * (x-t)) + 0.5 * sin(3 * pi * (x-t)));
figure(1)
mesh(x,t,u);
axis([0 2 0 2 -2 2]);
title('u=0.5.*((x+t).*exp(-(x+t).^2)+(x-t).*exp(-(x-t).^2)); mesh')
colormap cool
colorbar


• 点赞
• 评论
• 分享
x

海报分享

扫一扫，分享海报

• 收藏 1
• 打赏

打赏

天天学习的零柒贰幺

你的鼓励将是我创作的最大动力

C币 余额
2C币 4C币 6C币 10C币 20C币 50C币
• 举报
• 一键三连

点赞Mark关注该博主, 随时了解TA的最新博文

03-29
05-15
11-24
02-02 1万+
04-07 1535
12-30 4361
12-20 667
11-05 318
02-16 398
06-03 433
04-30 1万+
07-06 3767