solving equation returns 0x1 sym

27 ビュー (過去 30 日間)
Phillip Graf
Phillip Graf 2021 年 8 月 30 日
コメント済み: Phillip Graf 2021 年 9 月 7 日
I want to solve this example from a book:
This is the code:
syms r11 r12 r13 r21 r22 r23 r31 r32 r33
r11=0.766; r12=0; r13=0.643; r22=0.5;
GRB=[r11 r12 r13; r21 r22 r23; r31 r32 r33]
GRB = 
BRGGRB=GRB*GRB.';
Y=solve(BRGGRB==eye(3),[r21 r23 r31 r32 r33])
Y = struct with fields:
r21: [0×1 sym] r23: [0×1 sym] r31: [0×1 sym] r32: [0×1 sym] r33: [0×1 sym]
But when using the solver I keep getting empty fields. I've read some other answered questions with the same problem but couldn't figure the reason for mine.

回答 (1 件)

Kumar Pallav
Kumar Pallav 2021 年 9 月 2 日
The equation is not valid for any values of [r21 r23 r31 r32 r33]. If you change r11=1, and r13=0, you could see an output, as then the equation becomes valid.
You could see that BRGGRB(1,1) value is approximately 1 but not exactly 1. Hence, when you solve it by equating to identity matrix, it does not equate. You could try writing equations separately (refer this) and solve the equation.
  1 件のコメント
Phillip Graf
Phillip Graf 2021 年 9 月 7 日
Thank you. When I set BRGGB(1,1)=1 it works.
Is there any way to atuomate this?

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

カテゴリ

Help Center および File ExchangeSymbolic Math Toolbox についてさらに検索

製品


リリース

R2020a

Community Treasure Hunt

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

Start Hunting!

Translated by