2d surface plot matlab
Show older comments
I have x1,y1,z1.... xn,yn,zn.. and at each point I have the resultant value measured by experiment. Now for each plane I want to plot a surface plot. image of scatter3 with gridpoints is attached. scatter3 gives me 3d grid.
if
scatter3(x, y,z,20,resultantvalue);
end
4 Comments
Jesus Sanchez
on 27 Jul 2018
Edited: Jesus Sanchez
on 27 Jul 2018
did you try "surf" and "mesh". They do exactly that:
surf - Surface plot :This MATLAB function creates a three-dimensional surface plot.
mesh - Mesh plot: This MATLAB function draws a wireframe mesh with color determined by Z, so color is proportional to surface height.
If you want to have all in a 2-D plot, pcolor does the trick
Muhammad Faheem Awan
on 27 Jul 2018
Jesus Sanchez
on 27 Jul 2018
Hmm so you want to represent 5 different "surfaces" in only one figure. Is that right? If that is right, maybe something like:
figure
hold on
for i=1:5
mesh(X,Y,z(i,:))
end
hold off
If this is not what you intended I am sorry I think I do not understand you :(
Muhammad Faheem Awan
on 30 Jul 2018
Accepted Answer
More Answers (0)
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!