Plotting multiple inequalities in 3D Space
Show older comments
Hi, I wanted to plot a set of points in 3d space in Matlab subject to multiple inequalities. I tried doing this:
[x,y,x] = meshgrid(-10:0.1:10);
ineq = [0<=y, y<=3, 9-y.^2<=x, x<=9, 0<=z, z<=9-x]
x(~ineq) = NaN;
y(~ineq) = NaN;
z(~ineq) = NaN;
surf(x,y,z)
But I am told that I "Attempted to grow array along ambiguous dimension." I was wondering what the correct way to do this would be.
Accepted Answer
More Answers (0)
Categories
Find more on Surface and Mesh Plots in Help Center and File Exchange
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!