I wanted to 3D plot my data like shown in attached image.

3 visualizaciones (últimos 30 días)
Muniyat Rafa
Muniyat Rafa el 25 de Ag. de 2021
Comentada: Image Analyst el 27 de Ag. de 2021

Respuestas (2)

Turlough Hughes
Turlough Hughes el 25 de Ag. de 2021
Editada: Turlough Hughes el 25 de Ag. de 2021

Use surf() or

doc surf

there are several examples at both locations

  4 comentarios
Muniyat Rafa
Muniyat Rafa el 27 de Ag. de 2021
I used:
x=[0.431233185, 0.432959286, 0.305602993, 0.434045431, 0.284004725, 0.363586494, 0.397717881];
y=[3.5, 2.5, 1.5, 0, 1.5, 2.5, 3.5];
z=[68,68,68,68,68,68,68];
tri= delaunay(x,y);
h = plot(x,y,z,varargin{start:end});
X=rand(10,2);
dt=delaunayTrigulation (X);
triplot(dt)
[x,y,z]=meshgrid(1:15,1:15,1:15);
tri=delaunay(x,y,z);
z=peaks(15);
trisurf(tri,x,y,z)
Giving me this error:
>> Untitled
Error using plot
Data must be a single input of y-values or one or more pairs of x- and y-values.
Error in triplot (line 91)
h = plot(x,y,c,varargin{start:end});
Error in Untitled (line 5)
triplot(tri,x,y,z);
>> Untitled
Unrecognized function or variable 'start'.
Error in Untitled (line 5)
h = plot(x,y,z,varargin{start:end});
>> Untitled
Unrecognized function or variable 'start'.
Error in Untitled (line 4)
h = plot(x,y,z,varargin{start:end});
>> Untitled
Unrecognized function or variable 'start'.
Error in Untitled (line 4)
h = plot(x,y,z,varargin{start:end});
>> Untitled
Unrecognized function or variable 'start'.
Error in Untitled (line 3)
h = plot(x,y,z,varargin{start:end});
Image Analyst
Image Analyst el 27 de Ag. de 2021
Your x and y are only the first column of the table. You need to fill out the entire table to get a 2-D matrix.

Iniciar sesión para comentar.


Image Analyst
Image Analyst el 25 de Ag. de 2021
Try warp()

Categorías

Más información sobre 2-D and 3-D Plots en Help Center y File Exchange.

Etiquetas

Community Treasure Hunt

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

Start Hunting!

Translated by