problem of 2d PDE animation

2 visualizaciones (últimos 30 días)
suen
suen el 24 de Mzo. de 2024
Comentada: Torsten el 24 de Mzo. de 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?

Respuesta aceptada

Torsten
Torsten el 24 de Mzo. de 2024
Movida: Torsten el 24 de Mzo. de 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 comentario
Torsten
Torsten el 24 de Mzo. de 2024
Or simply:
pdesurf(p,t,u1(:,10));
colormap hot

Iniciar sesión para comentar.

Más respuestas (0)

Community Treasure Hunt

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

Start Hunting!

Translated by