How create a 3D- Surface modeling body if u have x,y,z-values
4 visualizaciones (últimos 30 días)
Mostrar comentarios más antiguos
Jan Nabo
el 26 de Ag. de 2019
Comentada: Star Strider
el 27 de Ag. de 2019
![](https://www.mathworks.com/matlabcentral/answers/uploaded_files/235327/image.jpeg)
![](https://www.mathworks.com/matlabcentral/answers/uploaded_files/235328/image.jpeg)
x=b(:,1);
y=b(:,2);
z=b(:,3);
plot3(x,y,z);
for ik=1:50;
VL=[x y z];
disp(VL);
end
- to look this picture
![](https://www.mathworks.com/matlabcentral/answers/uploaded_files/235329/image.png)
0 comentarios
Respuesta aceptada
Star Strider
el 26 de Ag. de 2019
Your data describe an outline in a plane. If you want to see it as a volume, duplicate the x and y values, add an offset to the second z value, and use the surf function or similar functions to visualise it.
Example:
x = [1 2 3 4 4 4 5 6 6 5 5 3 1];
y = [4 6 8 9 9 8 7 6 5 4 5 4 4];
z = ones(size(x));
figure
plot3(x, y, z)
grid on
xlim([0 8])
ylim([2 10])
figure
surf([x; x], [y; y], [z; z+5])
grid on
xlim([0 8])
ylim([2 10])
shading('interp')
I do not have your data, so I created my own.
Experiment to get the result you want.
4 comentarios
Star Strider
el 27 de Ag. de 2019
My pleasure!
If my Answer helped you solve your problem, please Accept it!
Más respuestas (0)
Ver también
Categorías
Más información sobre Surface and Mesh 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!