MATLAB Answers

Help needed in solving a matrix equation

2 ビュー (過去 30 日間)
VUTNOORI VAMSHI
VUTNOORI VAMSHI 2021 年 6 月 11 日
編集済み: Jan 2021 年 6 月 15 日
clear all;
A= [0,1;1,1];
B= [0,1;1,1];
Q= [2,0;0,4];
R= [0.5,0;0,0.25];
syms p11 p12 p21 p22
P = [p11,p12; p21, p22];
eqn = P*A + transpose(A)*P + Q - (P/2)*B*inv(R)*transpose(B)*P - (P/4)*B*inv(R)*transpose(B)*transpose(P) - (transpose(P)/4)*B*inv(R)*transpose(B)*P ==0;
S = solve(eqn);
disp(P);
I want to find the solution of P matrix, I am kind of new to MATLAB. Any kind of help is appreciated.

回答 (1 件)

Jan
Jan 2021 年 6 月 12 日
編集済み: Jan 2021 年 6 月 15 日
A= [0,1;1,1];
B= [0,1;1,1];
Q= [2,0;0,4];
R= [0.5,0;0,0.25];
syms p11 p12 p21 p22
P = [p11, p12; p21, p22];
eqn = P * A + A.' * P + Q - (P/2) * B * inv(R) * B.' * P - ...
(P/4) * B * inv(R) * B.' * P.' - (P.' / 4) * B * inv(R) * B.' *P == 0;
S = solve(eqn);
S.p11
ans = 
The same for the other components. So you did calculate your solution already, but display the input P instead of the output S.
  1 件のコメント
VUTNOORI VAMSHI
VUTNOORI VAMSHI 2021 年 6 月 14 日
Thanks for the answer !

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

Community Treasure Hunt

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

Start Hunting!

Translated by