How to solve this matrix?

I have some variables to find like x= [1x16 (x1,x2,x3,....x16 variables)] with condition that x1+x2+x3+....x16=1. I have also 16x16 matrix Q= [16x16 (real values)]. I need to solve the equation 'x*Q=x'. How can I solve it in Matlab?

回答 (2 件)

James Tursa
James Tursa 2018 年 11 月 14 日

1 投票

To get a basis for the solution space:
null(Q.' - eye(16))
Note that if Q.'-eye(16) is full rank then the only solution is a vector with all 0's.
Bruno Luong
Bruno Luong 2018 年 11 月 15 日
編集済み: Bruno Luong 2018 年 11 月 15 日

0 投票

>> P=[0.2 0.4 0.4; 1 0 0; 0.5 0.25 0.25]
P =
0.2000 0.4000 0.4000
1.0000 0 0
0.5000 0.2500 0.2500
>> pi=null(P'-eye(3))';
>> pi=pi/sum(pi)
pi =
0.4839 0.2581 0.2581
>> pi*31
ans =
15.0000 8.0000 8.0000
>> pi*P
ans =
0.4839 0.2581 0.2581
>>

カテゴリ

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

質問済み:

2018 年 11 月 14 日

編集済み:

2018 年 11 月 15 日

Community Treasure Hunt

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

Start Hunting!

Translated by