problem of 2d PDE animation

2 Ansichten (letzte 30 Tage)
suen
suen am 24 Mär. 2024
Kommentiert: Torsten am 24 Mär. 2024
although i sucessfuly find out the solution of the hyperbolic PDE, the surface are not the hot in colormap, is there any wrong order in my code on colormap('hot)'?otherwise,the colormap are only suitable for a graph but not a movie?

Akzeptierte Antwort

Torsten
Torsten am 24 Mär. 2024
Verschoben: Torsten am 24 Mär. 2024
g = 'squareg';
b = 'squareb3';
c=1;d=1;a=0;f=0;
[p,e,t]=initmesh(g);
x=p(1,:).';y=p(2,:).';
u0=atan(cos(pi*x));
ut0 = sin(cos(pi*y/3));
nframe = 200;
tlist = linspace(0,5,nframe);
u1 = hyperbolic(u0,ut0,tlist,b,p,e,t,c,a,f,d);
1915 successful steps 306 failed attempts 4444 function evaluations 1 partial derivatives 631 LU decompositions 4443 solutions of linear systems
pdeplot(p,[],t,'XYData',u1,'ZData',u1,'Colormap','hot')
%for j=1:nframe
% pdesurf(p,t,u1(:,j));
% mv(j) =getframe;
%end
%colormap(hot)
%movie(mv,1)
  1 Kommentar
Torsten
Torsten am 24 Mär. 2024
Or simply:
pdesurf(p,t,u1(:,10));
colormap hot

Melden Sie sich an, um zu kommentieren.

Weitere Antworten (0)

Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!

Translated by