I want to plot three surfaces in one figure

1 view (last 30 days)
Hi I have a problem regarding showing three surfaces together.
dx=0.05;dt=0.0001;
[c0,psi02d2,cold1,psiold1]=pnp2d(dx,dt,0.1,-1,'initial1')
[c0,psi02d2,cold2,psiold2]=pnp2d(dx,dt,0.05,-1,'initial1')
subplot(2,3,1); surf(c0')
subplot(2,3,2); surf(cold1')
subplot(2,3,3); surf(cold2')
i want to show them together in single graph

Accepted Answer

Image Analyst
Image Analyst on 29 Sep 2016
I don't know if it will work, but try using "hold on" instead of subplot().
  1 Comment
farjana siddiqua
farjana siddiqua on 29 Sep 2016
thank you so much.It worked,
dx=0.05;dt=0.0001; [c0,psi02d2,cold1,psiold1]=pnp2d(dx,dt,0.1,-1,'initial1') [c0,psi02d2,cold2,psiold2]=pnp2d(dx,dt,0.05,-1,'initial1')
surf(c0') hold on surf(cold1') hold on surf(cold2')
By the way can I choose different color for three of them?

Sign in to comment.

More Answers (0)

Community Treasure Hunt

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

Start Hunting!