
XYZ and Value plot
5 views (last 30 days)
Show older comments
I have point in space defined by Cartesian coordinates (XYZ) and value fot this point. I want to create 3D plot for all points including this value. I try to do that using surf but I don not know how to include a value for a given point. Maybe someone can help me?
1 Comment
Star Strider
on 2 Nov 2019
Aleksandra Rogowiec posted this Comment about an hour ago:
I want to do something like that below. I have 5042X4 matrix, first column is x value, second is y value, third is z value and fourth is pressure for this point I know how to make plot from all points - scatter3 (X, Y, Z, 10, pressure, '.'). But how to prepare a mesh like that and plot it?
%this preapre a mesh for all points but not include fourth column of matrix
[az,el,r]=cart2sph(dane_4000(:,1),dane_4000(:,2),dane_4000(:,3));
[Fi,Theta]=meshgrid(az,el);
[X_W,Y_W,Z_W]=sph2cart(Fi,Theta,r);
surf(X_W,Y_W,Z_W);

Answers (0)
See Also
Categories
Find more on Surface and Mesh Plots in Help Center and File Exchange
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!