Skip to content

Instantly share code, notes, and snippets.

@keskarnitish
Created March 23, 2014 01:16
Show Gist options
  • Save keskarnitish/9717036 to your computer and use it in GitHub Desktop.
Save keskarnitish/9717036 to your computer and use it in GitHub Desktop.
try
A=[-1 -2; -4 -3; 1 0 ; 0 1];
b = [ -40; -120; 0; 0];
plotregion(A,b);
hold on;
x=1:30;
y = (100 - 4*x)/5;
plot(x,y,'k--','LineWidth',2)
y = (136 - 4*x)/5;
plot(x,y,'k','LineWidth',2)
catch ME
if(strcmp(ME.identifier, 'MATLAB:UndefinedFunction'))
rethrow(ME);
display('Please download PlotRegion from MATLAB File Exchange')
display('Link: http://www.mathworks.com/matlabcentral/fileexchange/9261-plot-2d3d-region')
end
end
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment