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

6 次查看(过去 30 天)
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