View License

Download apps, toolboxes, and other File Exchange content using Add-On Explorer in MATLAB.

» Watch video

Highlights from
Diet Problem in Linear Programming

5.0 | 1 rating Rate this file 7 Downloads (last 30 days) File Size: 1.34 KB File ID: #44070 Version: 1.0
image thumbnail

Diet Problem in Linear Programming



The goal of Diet problem is to minimize the cost of food satisfying nutrient constraints.

| Watch this File

File Information

This code uses MATLAB inbuilt LP solver (linprog). There are 3 nutrients in the problem ( Carbohydrates , proteins and fat) which can be in between some minimum and maximum for a healthy diet. Objective here is to find cheapest diet satisfying nutrients requirement. There are five types of food with its cost. In this particular problem, Rice and Broccoli happens to be the cheapest diet. This file is for illustrating optimization in linear programming and not a suggestion for a healthy diet.

Required Products Optimization Toolbox
MATLAB release MATLAB 8.1 (R2013a)
Tags for This File   Please login to tag files.
Please login to add a comment or rating.
Comments and Ratings (3)
03 Dec 2016 Aleff Passos

Hi Sathyanarayan, can you comment the lines of you code please ?

01 Nov 2013 Sathyanarayan Rao

Hi Scott Richardson,
An objective of standard linear program problem is to maximize or minimize a vector c'x, subjected to the condition L<Ax<H. In this problem, we are trying to minimize the cost and lower bound L and upper bound H are given by lower and upper bounds on nutrients. So the condition matrix A should be the A_new matrix you are asking about. I have referred this textbook and I would suggest you also ,if you are interested more on Diet problem. Text: Linear Programming by Robert Vanderbei. Thanks

Comment only
29 Oct 2013 Scott Richardson

Hi, what is matrix "A_new"?


Comment only

Contact us