How to make this surface?

23 ビュー (過去 30 日間)
mc18004
mc18004 2019 年 12 月 4 日
回答済み: Akira Agata 2019 年 12 月 4 日
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 Center および File ExchangeGrid 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