How can I minimize a function with constraints on matrix ?

3 views (last 30 days)
Hi everyone,
I am trying to run a simulation where I want to minimize a parameter (lambda) such that a function equals to 0 (I don't want to minimize this function, I just want to find the lowest lambda which makes my function equal 0).
I am not sure what tools to use, I tried with fmincon but my constraints are on matrix and fmincon seems to support only scalar...(at a moment I need a matrix to be equal to a matrix of zero)
Some help would be awesome :)
Thanks
  10 Comments
Torsten
Torsten on 23 Feb 2017
No difference. I guess your solution with lower and upper bound is better. You'll get all possible rotations in your matrix if 0<=lambda<=2*pi - so you should choose 2*pi as upper bound.
Best wishes
Torsten.
Vincent DUFOUR
Vincent DUFOUR on 23 Feb 2017
Okay thanks a lot Torsten for all your answer I managed to make it work properly :)

Sign in to comment.

Answers (1)

Walter Roberson
Walter Roberson on 22 Feb 2017
If your condition is not that a function equals 0 but rather that a matrix of functions each equal 0, then you have a challenge.
Might I suggest that you instead minimize the sum of squares of the matrix elements?
You said that you wanted the smallest p for which that function becomes 0. Is it the case that there are multiple p values that achieve that, but you need the smallest of those different values? (Sort of in the spirit of looking for the smallest eigenvalue?) If that is the case, is there something known about the range of p that might be suitable, or something known about the maximum number of different p that might work?
  5 Comments
Walter Roberson
Walter Roberson on 23 Feb 2017
Edited: Walter Roberson on 23 Feb 2017
The minimizes make projections about where to try next, and might overshoot and end up in a different local minima. The first found will not necessarily be the one with the smallest lambda . However, it does help to know that the lower bound is 0: then if you find a different value, you can restrict your search to be between 0 and that value; if it comes up with a different value then you make that the new lowest and repeat using that as the upper bound; if no value is found and the search is fine-enough grained then you can end.
If you did not have a lower bound then the search would have to continue indefinitely.
Vincent DUFOUR
Vincent DUFOUR on 23 Feb 2017
All right thanks a lot for the explanation I finally found how to make it work :)

Sign in to comment.

Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!