Info

この質問は閉じられています。 編集または回答するには再度開いてください。

How to do a contour plot of a matrix C with respect to matrices A and B as X and Y axis?

3 ビュー (過去 30 日間)
TRAILOKYA
TRAILOKYA 2014 年 10 月 14 日
閉鎖済み: MATLAB Answer Bot 2021 年 8 月 20 日
I have three matrices A,B and C having same size 40*40. I want to plot a contour of C(40*40) taking A(40*40) as x axis and B(40*40) as y axis. Is it the correct way to plot by the following code ? Please help.
contourf (A,B,C);

回答 (1 件)

Sean de Wolski
Sean de Wolski 2014 年 10 月 14 日
A and B need to be monotonically increasing grids as would be the result from meshgrid
[xx,yy] = meshgrid(linspace(0,1,40));
contour(xx,yy,magic(40))
  3 件のコメント
Sean de Wolski
Sean de Wolski 2014 年 10 月 14 日
Read the documentation for meshgrid and contour.
TRAILOKYA
TRAILOKYA 2014 年 10 月 15 日
I have read the documentation...but still not able to do it.....

この質問は閉じられています。

タグ

Community Treasure Hunt

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

Start Hunting!

Translated by