close all;
clear all;
clc;
ts=0.01;
t=10;
x=100;
for m=1:1:t/ts
tt(m)=m*ts;
for n=1:1:x/ts
xx(n)=n*ts;
u(m,n)=8/9*exp(-1/2*abs(xx(n)-4/3*tt(m))); %F-W peakon
%KDV peakon
% u(m,n)=c/2*(2/(exp(sqrt(c)/2*(xx(n)-c*tt(m)))+exp(-sqrt(c)/2*(xx(n)-c*tt(m)))))^2;
end
end
for m=1 :1:t/ts
plot(xx,u(m,:));
pause(0.01);
end
Fornberg-Whitham equation peakon solution
于 2023-03-30 17:32:54 首次发布