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

1 view (last 30 days)
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

Accepted Answer

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

More Answers (0)

Categories

Find more on Creating and Concatenating Matrices in Help Center and File Exchange

Community Treasure Hunt

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

Start Hunting!