How to make this surface?

조회 수: 2 (최근 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 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