Solving System of 3 equations non trivial

6 ビュー (過去 30 日間)
Jonathan Leutz
Jonathan Leutz 2023 年 4 月 14 日
コメント済み: Jonathan Leutz 2023 年 4 月 15 日
Px = 8.08*10^5
Py = 4.63*10^5
P_A = 9.54*10^4
pCr = .89*10^5
m = [0 (pCr-Px) (pCr*.076);(pCr-Py) 0 0; 0 (.076*pCr) (.0089*(pCr-P_A))]
B = [0; 0; 0];
for pCr = .88*10^5:.1:.9*10^5
m = [0 (pCr-Px) (pCr*.076);(pCr-Py) 0 0; 0 (.076*pCr) (.0089*(pCr-P_A))]
X = linsolve(m,B)
if X ~= [0;0;0]
PCrit = pcr;
break;
end
end
I already know one critical values and my current proccess odviously does not work by testing a lot of Pcr values until I do not have a trivial I think there is a way to do it through Linear Algebra but I am brain farting right now.

採用された回答

Walter Roberson
Walter Roberson 2023 年 4 月 14 日
Px = 8.08*10^5
Px = 808000
Py = 4.63*10^5
Py = 463000
P_A = 9.54*10^4
P_A = 9.5400e+04
syms pCr;
m = [0 (pCr-Px) (pCr*.076);(pCr-Py) 0 0; 0 (.076*pCr) (.0089*(pCr-P_A))]
m = 
%are there general X such that m*x = [0;0;0] ?
%if so that would be the null space
null(m)
ans = Empty sym: 3-by-0
%nope, it is generally empty.
%what happens if we substitute in a particular value for pCr
m123 = subs(m, pCr, 123);
rank(m123)
ans = 3
null(m123)
ans = Empty sym: 3-by-0
%nope, full rank, no non-trival null space.
%but are there specific values of pCr that lead to lower rank?
pCrit = solve(det(m))
pCrit = 
vpa(pCrit)
ans = 
for K = 1 : size(pCrit,1)
disp('value being substituted for pCr:')
disp(pCrit(K))
disp('substituted matrix')
M = subs(m, pCr, pCrit(K))
disp('rank of substituted')
rank(M)
disp('null space of substituted')
null(M)
end
value being substituted for pCr:
463000
substituted matrix
M = 
rank of substituted
ans = 2
null space of substituted
ans = 
value being substituted for pCr:
substituted matrix
M = 
rank of substituted
ans = 2
null space of substituted
ans = 
value being substituted for pCr:
substituted matrix
M = 
rank of substituted
ans = 2
null space of substituted
ans = 
  1 件のコメント
Jonathan Leutz
Jonathan Leutz 2023 年 4 月 15 日
Perfect thank you!!

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

その他の回答 (0 件)

カテゴリ

Help Center および File ExchangeLinear Algebra についてさらに検索

Community Treasure Hunt

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

Start Hunting!

Translated by