How to plot inequalities

Try this: The red area is where both inequalities are satisfied. [X,Y]=meshgrid(0:0.01:1,0:0.01:1); % Make a grid of points between 0 and 1 p1=0.1; p2=0.2; % Choose some parameters ineq1 = Y<p2*(1-p1); ineq2 = X<p1*(1-(Y./(1-p1))); colors = zeros(size(X))+ineq1+ineq2; scatter(X(:),Y(:),3,colors(:),’filled’)

Suppress exponential formatting in figure ticks

EDIT According to this technical solution page, the recommended way of formatting the tick labels is this (you can use any of the number formatting functions like NUM2STR, SPRINTF, MAT2STR, or any other..) y = cool(7); bar(y(:,1)*1e6) set(gca, ‘YTickMode’,’manual’) set(gca, ‘YTickLabel’,num2str(get(gca,’YTick’)’)) However there seems to be a bug when it comes to the Z-axis (the … Read more