필터 지우기
필터 지우기

How to get different results from mldivide

조회 수: 2 (최근 30일)
Meytal
Meytal 2011년 8월 15일
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).

답변 (2개)

Walter Roberson
Walter Roberson 2011년 8월 15일
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 2011년 8월 15일
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
Meytal
Meytal 2011년 8월 15일
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?

댓글을 달려면 로그인하십시오.

카테고리

Help CenterFile Exchange에서 Operating on Diagonal Matrices에 대해 자세히 알아보기

태그

Community Treasure Hunt

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

Start Hunting!

Translated by