Code covered by the BSD License  

Highlights from
plot_feasible.m

Be the first to rate this file! 14 Downloads (last 30 days) File Size: 16.24 KB File ID: #24816
image thumbnail

plot_feasible.m

by Matthew Roughan

 

22 Jul 2009

plot_feasible.m is a simple bit of code for visualizing 2D linear programming problems.

| Watch this File

File Information
Description

plot_feasible(A, b, c, lower_b, upper_b, varargin)

Plots the feasible region of the 2D linear program
           maximize f = c'*x
           subject to A x <= b
on the region bounded by lower_b and upper_b.

It can plot the region, bounding lines, their intersection points and vertices of the feasible region along with the maximum. Its primary use (for me) is for students learning Linear Algebra.

Its has lots of options for making the plot look pretty, or annotating vertices, etc. And you can put iso-objective function lines across the plot to help. Multiple feasible region plots are also possible, to show overlaps.

Required Products Optimization Toolbox
MATLAB release MATLAB 7.4 (R2007a)
Tags for This File  
Everyone's Tags
Tags I've Applied
Add New Tags Please login to tag files.
Please login to add a comment or rating.
Tag Activity for this File
Tag Applied By Date/Time
optimization Matthew Roughan 22 Jul 2009 10:07:35
linear programming Matthew Roughan 22 Jul 2009 10:07:35
visualization Matthew Roughan 22 Jul 2009 10:07:35
linear algebra Matthew Roughan 22 Jul 2009 10:07:35
hatching Matthew Roughan 22 Jul 2009 10:07:35
specialized plots Matthew Roughan 22 Jul 2009 10:07:35
crosshatching Matthew Roughan 22 Jul 2009 10:07:35
graphics Matthew Roughan 22 Jul 2009 10:07:35
hatch Matthew Roughan 22 Jul 2009 10:07:35
linear programming Jan 17 Dec 2011 09:38:29
hatch ANIS 17 Jan 2012 12:55:46

Contact us at files@mathworks.com