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 件のコメント

Jesus Sanchez
Jesus Sanchez 2018 年 7 月 27 日
編集済み: Jesus Sanchez 2018 年 7 月 27 日
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
Muhammad Faheem Awan 2018 年 7 月 27 日
Thankyou Jesus, for your reply. Hope you see the attached figure and hopefully I was good to explain. As the figure shows I have 5 planes and each plane has x, and y points, for which I have corresponding values of intensity. I am not able to interpolate all points by using mesh. I use [X Y] = meshgrid[x y], which converts them into matrix, but then I am not able to interpolate values of intensity for these x and y.
Jesus Sanchez
Jesus Sanchez 2018 年 7 月 27 日
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
Muhammad Faheem Awan 2018 年 7 月 30 日
Thanks, Sanchez, It will probably help.

サインインしてコメントする。

 採用された回答

Quinten Rensen
Quinten Rensen 2018 年 7 月 27 日

0 投票

Maybe the function griddata() does the job?

その他の回答 (0 件)

カテゴリ

Community Treasure Hunt

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

Start Hunting!

Translated by