Building a surface plot

1 回表示 (過去 30 日間)
Tom
Tom 2013 年 2 月 23 日
Please would someone be willing to help me build a surface plot based on this code:
a = 5
b = 6
x = 1:a;
y = 1:b;
where z = sin(x/a)*sin(y/b)

採用された回答

Walter Roberson
Walter Roberson 2013 年 2 月 23 日
[X, Y] = meshgrid(x, y);
z = sin(X ./ a) * sin(y ./ b);
surf(x, y, z)
  1 件のコメント
Tom
Tom 2013 年 2 月 23 日
That's exactly what I wanted, many thanks.

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

その他の回答 (0 件)

カテゴリ

Help Center および File Exchange2-D and 3-D Plots についてさらに検索

タグ

製品

Community Treasure Hunt

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

Start Hunting!

Translated by