
How can I create a meshgrid to draw a 3d surface in a domain (zone 1) defined by the intersection of two oblique lines in Matlab (see attached figure)1. The variables 0

How can I create a meshgrid to draw a 3d surface in a domain (zone 1) defined by the intersection of two oblique lines in Matlab (see attached figure)1. The variables 0
Copyright © 2021 JogjaFile Inc.
the matlab
meshgridoutputs two rectangular grids.If you just want to display the surface in zone $1$ and not the others,
[x,y] = meshgrid(0:0.01:3); z = your_function(x,y).*((y > 0.5*x + 1) & (y > 6*x - 2)); surf(z)should do it (I'm just using a logical condition to mask off the area of interest, and set the function equal to zero elsewhere).