Using surf to plot a F(x,y,z) function on a surface

1 回表示 (過去 30 日間)
Gabriel
Gabriel 2014 年 11 月 28 日
回答済み: Gabriel 2014 年 12 月 1 日
Hello everyone,
I need to plot a scalar value stored in a vector Q on a 3D surface defined by vectors x, y and z. All those vectors have the same length. The points(x,y,z) are on a surface corresponding to a mesh (generated by comsol). The problem I have is that it seems to me that none of the matlab functions are made to do what I want with those "raw" data without processing them.
At first I achieved to solve this problem by transforming each of those vectors in a square matrix of size nxn with n the square root of the length of the above vectors.
But that was for points (x,y,z) generated by myself on a sphere (not with comsol). Now, with the points form the mesh, first I don't have vectors of a size "square rootable" and furthermore since the points are in a more random order (I presume), the surf function give me horrile figure with triangle going from on side of the surface to another (so basically the figure doesn't represent the surface).
So basically my question is how to have a nice plot of my scalar value (coded as a color) on a 3D surface defined by some (x,y,z) points (approximately like with scatter3 but with the space between the point filled)?
Thanks

回答 (1 件)

Gabriel
Gabriel 2014 年 12 月 1 日
Nobody knows ?

カテゴリ

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