How do I plot a 3D surface bounded over the first octant?
Mostrar comentarios más antiguos
I'm trying to plot the surface X+Y+Z=a bounded in the first octant, where a is a constant. My code so far is as follows, however, I have no idea how to bound it within the first octant and I always end up with a square, and not the expected result of a triangle.
a=2; [X,Y]=meshgrid(-3:0.5:3,-3:0.5:3); Z=a-X-Y; surf(X,Y,Z)
Respuesta aceptada
Más respuestas (0)
Categorías
Más información sobre Surface and Mesh Plots en Centro de ayuda y File Exchange.
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!