How to make this surface?

2 次查看(过去 30 天)
z = y*x
0<x<5
x/2<y<2

采纳的回答

Akira Agata
Akira Agata 2019-12-4
Straight-foward solution would be like this:
x = linspace(0,5);
y = linspace(0,2);
[xGrid, yGrid] = meshgrid(x,y);
zGrid = yGrid.*xGrid;
idx = xGrid./2 < yGrid;
zGrid(idx) = nan;
figure
surf(xGrid,yGrid,zGrid)

更多回答(0 个)

类别

Help CenterFile Exchange 中查找有关 Grid Lines, Tick Values, and Labels 的更多信息

标签

Community Treasure Hunt

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

Start Hunting!

Translated by