Effacer les filtres
Effacer les filtres

problem of 2d PDE animation

3 vues (au cours des 30 derniers jours)
suen
suen le 24 Mar 2024
Commenté : Torsten le 24 Mar 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?

Réponse acceptée

Torsten
Torsten le 24 Mar 2024
Déplacé(e) : Torsten le 24 Mar 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 commentaire
Torsten
Torsten le 24 Mar 2024
Or simply:
pdesurf(p,t,u1(:,10));
colormap hot

Connectez-vous pour commenter.

Plus de réponses (0)

Community Treasure Hunt

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

Start Hunting!

Translated by