Building a surface plot

3 次查看(过去 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)

更多回答(0 个)

类别

Help CenterFile Exchange 中查找有关 Surface and Mesh Plots 的更多信息

标签

产品

Community Treasure Hunt

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

Start Hunting!

Translated by