the question asks to subplot the contours any idea how?

14 ビュー (過去 30 日間)
dulanga
dulanga 2017 年 3 月 7 日
コメント済み: KSSV 2017 年 3 月 8 日
x = linspace (-1,1); y = linspace (-1,1); [X, Y] = meshgrid(x,y); Z=7*sin(pi.*X).*cos(3*pi.*X);
surf(X,Y,Z ) hold on contour(X,Y,Z) hold off
rotate3d on
the question asks to subplot the contours any idea how?

回答 (1 件)

KSSV
KSSV 2017 年 3 月 7 日
x = linspace (-1,1);
y = linspace (-1,1);
[X, Y] = meshgrid(x,y);
Z=7*sin(pi.*X).*cos(3*pi.*X);
subplot(211)
surf(X,Y,Z )
subplot(212)
contour(X,Y,Z)
rotate3d on
  2 件のコメント
dulanga
dulanga 2017 年 3 月 7 日
hi the second subplot just has a bunch of lines?
KSSV
KSSV 2017 年 3 月 8 日
For your data the contour lines would be straight.

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

カテゴリ

Help Center および File ExchangeLighting, Transparency, and Shading についてさらに検索

Community Treasure Hunt

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

Start Hunting!

Translated by