problem of 2d PDE animation

2 次查看(过去 30 天)
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?

采纳的回答

Torsten
Torsten 2024-3-24
移动:Torsten 2024-3-24
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)

更多回答(0 个)

Community Treasure Hunt

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

Start Hunting!

Translated by