필터 지우기
필터 지우기

plot the region represented by 'ABS (x) + abs (y)≤1'

조회 수: 6 (최근 30일)
军 川
军 川 2022년 4월 14일
댓글: 军 川 2022년 4월 14일
I know the picture of this inequality, but he has x and y as variables. How do I plot it

채택된 답변

Chunru
Chunru 2022년 4월 14일
If you don't want to derive the boundary of the surface, you can do the following:
[xx, yy] = meshgrid(linspace(-2, 2), linspace(-2,2));
zz = ones(size(xx));
zz( (abs(xx) + abs(yy)) > 1) = nan;
surf(xx, yy, zz, 'EdgeColor', 'none'); view(0, 90); axis equal
  댓글 수: 1
军 川
军 川 2022년 4월 14일
Thank you.I've been experimenting with a two-dimensional approach, and I didn't realize that the three-dimensional representation worked so well.

댓글을 달려면 로그인하십시오.

추가 답변 (0개)

카테고리

Help CenterFile Exchange에서 Graphics에 대해 자세히 알아보기

Community Treasure Hunt

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

Start Hunting!

Translated by