hi, i am using this code.....alfa = inv([r00 r11 r10 r12; r11 r00 r01 r01;... r10 r01 r00 r02; r12 r01 r02 r00])*[r01 r10 r11 r11]; in which i am getting the error"Error using * Inner matrix dimensions must agree"

1 回表示 (過去 30 日間)
tina jain
tina jain 2015 年 2 月 26 日
コメント済み: James Tursa 2015 年 2 月 26 日
i also changed the position of inv, but then also its not working
  1 件のコメント
James Tursa
James Tursa 2015 年 2 月 26 日
In the future, post your code in the Question part ... not in the Title part.

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

回答 (1 件)

James Tursa
James Tursa 2015 年 2 月 26 日
編集済み: James Tursa 2015 年 2 月 26 日
Assuming all of your rxx variables are scalars:
This is a 4x4 matrix:
[r00 r11 r10 r12; r11 r00 r01 r01;... % 1st and 2nd rows
r10 r01 r00 r02; r12 r01 r02 r00] % 3rd and 4th rows
This is a 1 x 4 vector:
[r01 r10 r11 r11]
So you are doing (4 x 4) * (1 x 4), hence the error. If you want the vector to be a 4 x 1 column instead of a row, build it with semi-colons instead. E.g.,
[r01;r10;r11;r11]

カテゴリ

Help Center および File ExchangeEncryption / Cryptography についてさらに検索

Community Treasure Hunt

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

Start Hunting!

Translated by