Filter löschen
Filter löschen

How to get different results from mldivide

2 Ansichten (letzte 30 Tage)
Meytal
Meytal am 15 Aug. 2011
Hi, I want to try and solve linear set of equations with mldivide, but if the solution is not good for me, I would like to get a different solution. Is there a way to get another solution by calling the function again? And How does MATLAB decides which solution to give? knowing this would help me decide if I need to look for a different solution, or there's no solution like the one I'm looking for (not negative).

Antworten (2)

Walter Roberson
Walter Roberson am 15 Aug. 2011
We discussed this before. Your problem is not suitable for solution by linear algebra methods. The answer I gave before included a link to an article that lists a number of methods that are suitable for this type of problem.
(The problem is effectively a knapsack problem, or alternately, a set of linear diophontane equations restricted to non-negative multiples.)

Jan
Jan am 15 Aug. 2011
The solution is "not good for you"?! MATLAB's MLDIVIDE calculates the numerically correct solution for quadratic systems and the least squares solution. This is explained in doc mldivide.
Please explain the details, if you want something different.
  1 Kommentar
Meytal
Meytal am 15 Aug. 2011
I need an integer non-negative solution, and since, as far as I know, there is no way to ask that from matlab, I would like to 'iterate' over possible solutions.. Is there a way to do that?

Melden Sie sich an, um zu kommentieren.

Kategorien

Mehr zu Operating on Diagonal Matrices finden Sie in Help Center und File Exchange

Tags

Community Treasure Hunt

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

Start Hunting!

Translated by