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
Rik el 8 de Dic. de 2021
Of course you can, but how do you want to determine the other lines to be plotted from your single line? Is all the data in field0?
Vahram Voskerchyan
Vahram Voskerchyan el 8 de Dic. de 2021
yes, that's the problem all data is in field0.
Matt J
Matt J el 8 de Dic. de 2021
That's not the problem. It's a part of the problem definition. You must select one of the infinite possible 3D extensions that you want and tell us what it is.
Vahram Voskerchyan
Vahram Voskerchyan el 8 de Dic. de 2021
the idea is to somehow rotate the plot taking the peak point as the center and have a 3D plot.
Rik
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?
Vahram Voskerchyan
Vahram Voskerchyan el 8 de Dic. de 2021
I want to rotate it clockwaise with the shape it has.

Iniciar sesión para comentar.

 Respuesta aceptada

Matt J
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)

1 comentario

Vahram Voskerchyan
Vahram Voskerchyan el 9 de Dic. de 2021
thanks a lot for your answer! didn't know about the deal command.

Iniciar sesión para comentar.

Más respuestas (1)

DIVYA K
DIVYA K el 10 de Ag. de 2022

0 votos

is there chance to do this line graph into 3D graph

Categorías

Más información sobre Line Plots en Centro de ayuda y File Exchange.

Productos

Versión

R2021b

Preguntada:

el 8 de Dic. de 2021

Respondida:

el 10 de Ag. de 2022

Community Treasure Hunt

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

Start Hunting!

Translated by