Technical query on surf command
1 回表示 (過去 30 日間)
古いコメントを表示
Hi
I have a technical question regarding surf command.
I wanted to know if I create a mesh grid having x & y values and create a function for getting z values for each of the points.
Then I have z values for each (x,y) . However when I plot, I see a single grid (square/rectangle) in the mesh represents one color but we have 4 values of z corresponding to one grid.
How does matlab know which value to use for getting the exact color value or does it do an average of z values and gets the corresponding color value.
Thanks
Sukrit
0 件のコメント
回答 (1 件)
Walter Roberson
2020 年 8 月 18 日
MATLAB chooses the color according to bilinear interpolation at the center of the face, using the information from the four corners of the face.
If you would prefer that interpolation not be done, that each input location corresponds to a color, then you should use texturemapping . The easiest way to do this kind of texture mapping is to use warp() instead of surf()
2 件のコメント
Steven Lord
2020 年 8 月 18 日
The description of the FaceColor, CData, and CDataMapping properties of a surface may be of interest.
参考
カテゴリ
Help Center および File Exchange で Surface and Mesh Plots についてさらに検索
製品
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!