how to create surface plot during each time calculation for several times?
Información
La pregunta está cerrada. Vuélvala a abrir para editarla o responderla.
Mostrar comentarios más antiguos
Greeting to instructors:
I tried to create 6 surface plots, 2 plots each time. The coding logic is below:
XP=linspace(0,1,50); YP=linspace(0,1,50); [X,Y]=meshgride(XP,YP);
for i=1:3
----
A1=some function of X and Y, A2=another function form of X and Y;
figure
mesh(X,Y,A1)
figure
mesh(X,Y,A2)
end
MatLab gives me 6 figures without curves in it.
I modify my code to another form, using subplot command, as below
XP=linspace(0,1,50); YP=linspace(0,1,50); [X,Y]=meshgride(XP,YP);
for i=1:3
----
A1=some function of X and Y, A2=another function form of X and Y;
subplot(3,2,2*i-1)
mesh(X,Y,A1)
subplot(3,2,2*i)
mesh(X,Y,A2)
end
this time, Matlab gives me 2 plots without curve in it. Could you teach me how to create 6 correct figures. Your kindly helps will be deeply appreciated. With best regards,
Donyau
Respuestas (1)
Walter Roberson
el 26 de Jun. de 2016
0 votos
It is likely that your X or your Y or your A1 and A2 are empty or consist of a single point.
If you are using division in your formula, make sure you use ./ instead of / as the operator.
3 comentarios
Donyau Chiang
el 28 de Jun. de 2016
Editada: Walter Roberson
el 28 de Jun. de 2016
Walter Roberson
el 28 de Jun. de 2016
All of your A6 is infinite. This is due to your A5 being quite large, on the order of 10^214 or more in the real and imaginary parts.
Not all of your A4 is infinite, but all of the part that is selected for plotting is.
The first 4 plots look okay to me when I try.
Donyau Chiang
el 29 de Jun. de 2016
La pregunta está cerrada.
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!