Plot shell boundary in 3D

12 ビュー (過去 30 日間)
Orion
Orion 2018 年 6 月 4 日
回答済み: Varun Garg 2018 年 6 月 5 日
I want to plot a shell layer structure in 3D space. I have three-dimensional coordinate vectors x(:,:,:), y(:,:,:), z(:,:,:) and a data vector V(:,:,:) that has nonzero values at the shell locations and is zero elsewhere. The closest image that I could find similar to what I want is this:
How can I do this? Let's say, I only need to plot the middle layer. The closest that I could do is to use:
s=scatter3(x,y,z,1,V)
But this creates a plot of scattered data points. Is there a way to get Matlab to create a surface out of the scatter points?

回答 (1 件)

Varun Garg
Varun Garg 2018 年 6 月 5 日
Hi Hadi,
I understand from your question that you want a better graph plot than scatter plot and preferably something continuous.
I guess the surface plot function should do the trick for you. Try implementing
surf
Sample Snippet :
[X,Y] = meshgrid(1:0.5:10,1:20);
Z = sin(X) + cos(Y);
surf(X,Y,Z)
You might find the documentation very useful.

カテゴリ

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

製品


リリース

R2017a

Community Treasure Hunt

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

Start Hunting!

Translated by