plot the region represented by 'ABS (x) + abs (y)≤1'
6 visualizaciones (últimos 30 días)
Mostrar comentarios más antiguos
I know the picture of this inequality, but he has x and y as variables. How do I plot it
0 comentarios
Respuesta aceptada
Chunru
el 14 de Abr. de 2022
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
Más respuestas (0)
Ver también
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!