フィルターのクリア

Info

この質問は閉じられています。 編集または回答するには再度開いてください。

Matrices inside matrix operation

1 回表示 (過去 30 日間)
Alan Campos Valdillez
Alan Campos Valdillez 2020 年 2 月 10 日
閉鎖済み: MATLAB Answer Bot 2021 年 8 月 20 日
I am working on a synchronous machine model and need to perform some operations, for example:
a=(omegar*T3-Rs-omegar*T5*inv(Lr)*T4)*is;
b=(omegar*T5*inv(Lr))*lambdar;
c=(T3-T5*inv(Lr)*T4)*dis;
d=(T5*inv(Lr))*dlambdar;
where all the terms involved, except "is","dis","dlambdar" and "lambdar", are matrices.
I am trying to form a 2x1 matrix which contains these terms as follows:
vs=[a+c;b+d];
but an error regarding dimensions appears. I have performed every product individually and the problem is not due to an individual matrix dimension. Thanks in advance for your help!

回答 (1 件)

David Hill
David Hill 2020 年 2 月 10 日
Please attach examples of your matrices; otherwise, it is hard to help.
  1 件のコメント
Alan Campos Valdillez
Alan Campos Valdillez 2020 年 2 月 10 日
Some matrices are defined like this:
Ks=2/3*[cos(phir) cos(phir-2*pi/3) cos(phir+2*pi/3);-sin(phir) -sin(phir-2*pi/3) -sin(phir+2*pi/3);1/2 1/2 1/2];
invKs=[cos(phir) -sin(phir) 1;-cos(phir+pi/3) sin(phir+pi/3) 1; -cos(phir-pi/3) -cos(phir+pi/6) 1];
dinvKs=wr*[-sin(phir) -cos(phir) 0;sin(phir+pi/3) cos(phir+pi/3) 0; -sin(phir+2*pi/3) sin(phir+pi/6) 0];
omegar=[0 -wr 0;wr 0 0;0 0 0];
T1=Ks*rs*invKs;
T2=Ks*dinvKs;

この質問は閉じられています。

タグ

Community Treasure Hunt

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

Start Hunting!

Translated by