How MATLAB deal with infinity Many Solution System

I want to Solve a System using MATLAB this System has infinity many solutions but it gave me number values as a solution with a warning : warning rank deficient rank 3
my Question is How does MATLAB deal with Systems of infinity many solutions ?
thank you..

回答 (1 件)

Torsten
Torsten 2015 年 4 月 23 日

0 投票

Which type of system do you have ? A linear system of equations ? Then you may use the \-operator to get a single solution. Or you can use the \-operator together with the null-command to get all solutions.
Best wishes
Torsten.

5 件のコメント

Amro Meshref
Amro Meshref 2022 年 9 月 3 日
I have a linear system which has infinite solutions. How can I use matlab to solve it?
Torsten
Torsten 2022 年 9 月 3 日
The question is: what do you want MATLAB to return ? If the system has an infinite number of solution, MATLAB can't list all of them. Maybe you want one particular solution and a basis of the null space ?
Amro Meshref
Amro Meshref 2022 年 9 月 8 日
編集済み: Amro Meshref 2022 年 9 月 8 日
Ok. How do I get them? (Null space basis and and the particular solution)
Bruno Luong
Bruno Luong 2022 年 9 月 8 日
@Amro Meshref Torsen has already provided the function names you need to use: "... you can use the \-operator together with the null-command to get all solutions."
Actually I think "\" is not a reliable way to get solution in some circumtances but this is for another discussion.
Torsten
Torsten 2022 年 9 月 8 日
編集済み: Torsten 2022 年 9 月 8 日
Example:
A = [1 2; -0.5 -1];
b = [1; -0.5];
% Don't know why
% sol_inhom = A\b or sol_inhom = lsqlin(A,b)
% gives NaN in both components
sol_inhom = lsqnonlin(@(x)A*x-b,[1; 1]);
Local minimum found. Optimization completed because the size of the gradient is less than the value of the optimality tolerance.
sol_hom = null(A);
sol = @(lambda)sol_inhom + lambda*sol_hom
sol = function_handle with value:
@(lambda)sol_inhom+lambda*sol_hom

サインインしてコメントする。

カテゴリ

ヘルプ センター および File ExchangeMathematics についてさらに検索

タグ

質問済み:

2015 年 4 月 22 日

編集済み:

2022 年 9 月 8 日

Community Treasure Hunt

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

Start Hunting!

Translated by