Solving an Argument in MATLAB with Linprog

In summary, the conversation discusses a problem that the speaker is having with finding the minimum solution of an argument in MATLAB using linprog. They mention the matrices involved and their attempts to use the function, as well as a suggested alternative called cvx. The conversation also touches upon the flexibility and limitations of MATLAB.
  • #1
physical101
47
0
Dear All

Firstly, thank you for looking at my post.

I am so close to a solution to a problem that has been given me a massive headache.

I am also very stupid and was wondring if one of smart guys could take a look at my problem and see if you might be able to help.

I am trying to find the minimum solution of an argument in MATLAB using linprog.

The argument takes the form of:

s(t)=arg min||s(t)||1

subject to

||As(t) - x(t)||22<e

s is a five by one 1 matrix

A is a three by five matrix

and x(t) is a 3 by 1

I can't get linprog to work at all and ideally I would like the s values that minimise the statement above returned.

Any ideas or pointers of places to look would be very much appreciated.

Thank you for your time

Duane
 
Physics news on Phys.org
  • #3
Thank you for your reply. I find Matlab to be a strange beast - flexible enough to do anything - yet so frustratingly constrained you feel like you can do nothing. There is a lp toolbox written by Stanford uni called cvx. This allows you to write the problem as you see it ie min argument subject to conditions. Much better than linprog and I am told its just as quick.
 
  • #4
Well I think that's a bit harsh. All of the most common functionality is built in, and that's enough for 95% of applications. Specific and custom functionality can then be written on top, and that's what the file exchange/your brain is for.
 
  • #5
That is true - I admit it, I'm lazy. Well done to the guys who wrote cvx.
 

1. What is Linprog in MATLAB?

Linprog is a built-in function in MATLAB that stands for linear programming. It is used to solve optimization problems where the objective function and constraints are all linear. It is commonly used to find the optimal solution to a problem that has multiple constraints.

2. How does Linprog work in MATLAB?

Linprog works by taking in the objective function and the constraints of a linear programming problem and using an algorithm to find the optimal solution. The algorithm used is called the simplex method, which iteratively moves from one feasible solution to another until the optimal solution is reached.

3. What are the inputs and outputs of Linprog in MATLAB?

The inputs of Linprog in MATLAB are the objective function, the constraints, and the bounds for the variables. The output is the optimal solution for the problem, including the values for the variables and the minimum or maximum value of the objective function.

4. What are some common uses of Linprog in MATLAB?

Linprog is commonly used in various fields such as economics, engineering, and operations research to solve optimization problems. It can be used to find the best allocation of resources, minimize costs, or maximize profits. It is also used in the design of experiments, scheduling, and portfolio optimization.

5. What are some limitations of using Linprog in MATLAB?

One limitation of using Linprog in MATLAB is that it can only solve linear programming problems. It cannot handle non-linear functions or constraints. Additionally, the solution may not always be unique, and there may be multiple optimal solutions. It is also sensitive to the choice of starting point, and a slight change in the problem formulation can result in a different optimal solution.

Similar threads

  • MATLAB, Maple, Mathematica, LaTeX
Replies
3
Views
3K
  • MATLAB, Maple, Mathematica, LaTeX
Replies
4
Views
2K
  • MATLAB, Maple, Mathematica, LaTeX
Replies
32
Views
2K
  • MATLAB, Maple, Mathematica, LaTeX
Replies
5
Views
995
  • MATLAB, Maple, Mathematica, LaTeX
Replies
2
Views
2K
  • MATLAB, Maple, Mathematica, LaTeX
Replies
2
Views
1K
  • MATLAB, Maple, Mathematica, LaTeX
Replies
1
Views
745
  • MATLAB, Maple, Mathematica, LaTeX
Replies
5
Views
1K
  • MATLAB, Maple, Mathematica, LaTeX
Replies
5
Views
2K
  • MATLAB, Maple, Mathematica, LaTeX
Replies
2
Views
3K
Back
Top