How to plot 3D using a table

53 ビュー (過去 30 日間)
Mad Gano
Mad Gano 2022 年 6 月 27 日
コメント済み: William Rose 2022 年 7 月 5 日
I have for example this table
I would like to plot this table 3D so that the values in between have to be interpreted with respect to the balloon size but also with smooth color change (here I use e.g. colormap(jet)).
P.s
Actually I can't understand the surf(X,Y,Z,C) because X,Y,Z are only vectors and C can't be defined.

採用された回答

William Rose
William Rose 2022 年 6 月 27 日
Please sypply your data as a mat file or text file instead of an image. Thank you.
I do not understand your goal. Do you want to plot spheres of different radii and colors, with centers at the specified x,y,z values? If so, it appears that there will b a number of pairs of balloons that mostly overlap eachother.
Do the specified x,y,z points represent samples of a surface, and you want to interpolate to get other points on the surface? If so, then you might be able to interpolate z values at other x,y locations, or you can interpolate radii or colors at other x,y locations, or you can do all three, but those interpolations must be done independently. Is that your goal? If it is your goal, then it will be difficult, because the distribution of points in the table is very uneven in the x-y plane. X values range from 1.41 to 3.66, but are unevenly spread. Y values are also unevenly spread: y=4.69 (n=2), y=6.56 (n=7), y=8.36 (n=1), y=8.44 (n=25).
  9 件のコメント
Mad Gano
Mad Gano 2022 年 7 月 5 日
thank you william I appreciate your support
William Rose
William Rose 2022 年 7 月 5 日
@Mad Gano, you are welome. Good luck with your work.

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

その他の回答 (1 件)

Pooja Kumari
Pooja Kumari 2022 年 6 月 28 日
Dear Mad Gano,
It is my understanding that you want to plot the given table in 3D using surf function and the values X,Y,Z have to be interpreted with respect to balloon size.
surf(X,Y,Z,C) creates a 3-D surface plot with x-y plane defined by X and Y and C taken surface color only.
You can only plot 3D graph using surf with three parameters at a time. So, if you want to plot your data with respect to balloon size.
%with different combination of X,Y,Z with respect to %BalloonSize.
surf(X,Y,BalloonSize)
surf(Y,Z,BalloonSize)
surf(Z,X, BalloonSize)
For more information on surf function, you can follow the provided documentation below:
For more information on jet function, follow the below provided link:
Sincerely,
Pooja Kumari

カテゴリ

Help Center および File ExchangeSurface and Mesh Plots についてさらに検索

Community Treasure Hunt

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

Start Hunting!

Translated by