How to convert 2D plot to 3D.
20 visualizaciones (últimos 30 días)
Mostrar comentarios más antiguos
Vahram Voskerchyan
el 8 de Dic. de 2021
Respondida: DIVYA K
el 10 de Ag. de 2022
I have a plot that gives me the following plot.
plot(field0(:,1), field0(:,2))
xlim([-0.1 0.02])
Is it possible to convert this to 3D plot that will look something like this?
6 comentarios
Rik
el 8 de Dic. de 2021
In that case you must first try to find the peak point and decide how exactly you want to rotate. Do you want to make it symetrical? The plot you showed isn't symetrical itself, so how should the code deal with that?
Respuesta aceptada
Matt J
el 8 de Dic. de 2021
Editada: Matt J
el 8 de Dic. de 2021
You must select one of the infinite possible 3D extensions that you want and tell us what it is.
One possibility:
load field0
x=field0(:,1);
idx=abs(x)<0.08;
[x,y,z]=deal(x(idx),x(idx),field0(idx,2));
surf(x,y,z*z.','MeshStyle','row'); view(10,60)
Más respuestas (1)
Ver también
Categorías
Más información sobre 2-D and 3-D Plots en Help Center y File Exchange.
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!