Borrar filtros
Borrar filtros

How to get different results from mldivide

2 visualizaciones (últimos 30 días)
Meytal
Meytal el 15 de Ag. de 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).

Respuestas (2)

Walter Roberson
Walter Roberson el 15 de Ag. de 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 el 15 de Ag. de 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 comentario
Meytal
Meytal el 15 de Ag. de 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?

Iniciar sesión para comentar.

Categorías

Más información sobre Operating on Diagonal Matrices en Help Center y File Exchange.

Etiquetas

Community Treasure Hunt

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

Start Hunting!

Translated by