plot the region represented by 'ABS (x) + abs (y)≤1'
조회 수: 6 (최근 30일)
이전 댓글 표시
채택된 답변
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
추가 답변 (0개)
참고 항목
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!