i get error saying that z should be a matrix and not a scalar

1 次查看(过去 30 天)
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

采纳的回答

Stephen23
Stephen23 2017-3-7
Z=7*sin(pi.*X).*cos(3*pi.*X);

更多回答(0 个)

类别

Help CenterFile Exchange 中查找有关 Creating and Concatenating Matrices 的更多信息

标签

Community Treasure Hunt

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

Start Hunting!

Translated by