Displaying surface in XY plane

61 ビュー (過去 30 日間)
Karina
Karina 2011 年 10 月 3 日
回答済み: Jose Sosa Lopez 2020 年 9 月 8 日
Dear all! I could not find answer of this question. How to display surface in XY plane with the code? Here is my code:
Z1=reshape(u1,J,I);
[X,Y]=meshgrid(t,x);
surf(X,Y,Z1,Z1);
colorbar;
shading interp;
caxis([0 8]);
axis([-5 5 -5 5 0 10]);
Sorry if question already has been asked. And I apologize for my English:)
  3 件のコメント
Karina
Karina 2011 年 10 月 3 日
By deafult it displays in isometric projection, but I want to display it in XY plane
Fangjun Jiang
Fangjun Jiang 2011 年 10 月 3 日
How can you display a surface (assume 3D) in a plane (like a piece of paper)? Are you looking for contour()?

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

採用された回答

Fangjun Jiang
Fangjun Jiang 2011 年 10 月 3 日
view(2)
  1 件のコメント
Karina
Karina 2011 年 10 月 3 日
Thank you a lot! It is what I wanted. It doesn't work, but I'll find how to use it (view([0 89]) works, but view(2), that means view([0 90]), doesn't).

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

その他の回答 (2 件)

Jose Sosa Lopez
Jose Sosa Lopez 2020 年 9 月 8 日
A few years later, but what I did in my code which was similar, after to create the figure, I put the comand:
view ([0 0 90])
so, I get the X-Y view
if I want the X-Z view, I use:
view ([0 -90 0])
I guess it depends of the arrangment of your view.

Matt Tearle
Matt Tearle 2011 年 10 月 3 日
"I want to display it in XY plane"
You mean as an image or contour map? In which case, use imagesc or contour. doc contour gives other options as well (filled contours, and so on).
  1 件のコメント
Karina
Karina 2011 年 10 月 3 日
Sorry, I am so stupid... When Matlab executed the code, I click on image with right mouse button and choose 'Go to X-Y view'. I want to do the same operation, but without mouse. Just using the code.

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

カテゴリ

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