I want to make a 3-D surface plot without contour lines of the function but I keep receiving a Matrix dimensions must agree error
4 次查看(过去 30 天)
显示 更早的评论
% 3)Make a 3-D surface plot without contour lines of the function .
z = peaks(exp(2*(x-1).^2+(y+2).^2));
peaks(25);
colormap(pink) % change color map
shading interp
1 个评论
Saravanan Sengottuvel
2021-4-9
Your code works fine for me. Does your input variables x and y dimensions are matching ?
采纳的回答
Saravanan Sengottuvel
2021-4-9
x = linspace(1,10,1000);
y = linspace(1,10,1000);
z = peaks(exp(2*(x-1).^2+(y+2).^2));
peaks(25);
colormap(pink) % change color map
shading interp
Try this code.
更多回答(0 个)
另请参阅
类别
在 Help Center 和 File Exchange 中查找有关 Surface and Mesh Plots 的更多信息
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!