MATLAB: How to plot the region for two inequalities

graphplot

I'm looking to plot the two inequalities for the formula: abs(x+y+x.^2<3) and abs(y+x+y.^2<3)
with them both being on the same plot. How would I go about doing this please? Or any other similar example is fine.
Thanks in advance

Best Answer

Here's how to numerically evaluate the conditions and visualize them.
v = -5:0.01:5; % plotting range from -5 to 5
[x y] = meshgrid(v); % get 2-D mesh for x and y
cond1 = x+y+x.^2 < 3; % check conditions for these values
cond2 = y+x+y.^2 < 3;
cond1 = double(cond1); % convert to double for plotting
cond2 = double(cond2);
cond1(cond1 == 0) = NaN; % set the 0s to NaN so they are not plotted
cond2(cond2 == 0) = NaN;
cond = cond1.*cond2; % multiply the two condaces to keep only the common points
surf(x,y,cond)
view(0,90) % change to top view