How to plot a surface in Matlab?

1 回表示 (過去 30 日間)
Cankut Eker
Cankut Eker 2016 年 9 月 28 日
コメント済み: Cankut Eker 2016 年 9 月 28 日
I would like to plot a surface in matlab; however, matlab is assigning each element of the matrix to an intersection of the meshgrid. I want each element of my matrix to be the value of each square in the meshgrid, not at the intersections. The result of this problem is that I am 'missing' a row/column on one end of my surface plot due to the color mapping. Using the data cursor I can confirm that the values are there, except on the intersections of the grid lines; hence the edges are effectively missing a row/column visually. I want a 3D equivalent of imagesc. Any ideas?
  7 件のコメント
Cankut Eker
Cankut Eker 2016 年 9 月 28 日
Thank you so much! It worked! Is there anyway to put the surface lines on?
Cankut Eker
Cankut Eker 2016 年 9 月 28 日
Nevermind figured it out. Thank you very much everyone!

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

採用された回答

José-Luis
José-Luis 2016 年 9 月 28 日
You could use image() instead.
  4 件のコメント
Cankut Eker
Cankut Eker 2016 年 9 月 28 日
I think this would have also solved it so I am going accept this as an answer, including the line 'shading interp' solved it. I just need to find a way to put the lines back into the surface plot :)
Cankut Eker
Cankut Eker 2016 年 9 月 28 日
The property 'edgecolor','k' did the trick ;)

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

その他の回答 (0 件)

カテゴリ

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