How to generate a surface by a function defined by two sentences?
显示 更早的评论
I would like to generate a graphic like this:

(I'm using >> [X,Y]= meshgrid(0:0.01:1,0:0.01:1);
surf(X,Y,X.*Y);
colorbar. To generate this figure).
But for a function defined by two sentences:

2 个评论
Walter Roberson
2021-7-21
z = cos(2*pi*Y);
mask = X>0;
z(mask) = z(mask) + X(mask).^2.5;
surf(X, Y, Z)
João Micheletti
2021-7-21
回答(0 个)
类别
在 帮助中心 和 File Exchange 中查找有关 Annotations 的更多信息
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!