フィルターのクリア

Error using / Matrix dimensions must agree app designer

2 ビュー (過去 30 日間)
Dominik Gajdos
Dominik Gajdos 2024 年 4 月 14 日
コメント済み: Voss 2024 年 4 月 14 日
Hi , i have code, that works perfectly in script , but when i try to run it in app designer i got error. On 1st line i got this :
Matrix dimensions must agree.
and i guess it will be on every line.
app.q1 = real(acosd(app.d4/sqrt(app.AA^2+app.BB^2))+atan2d(app.BB,app.AA)+90);
app.q5 = real(acosd((app.px*sind(app.q1)-app.py*cosd(app.q1)-app.d4)/app.d6));
app.CC = cosd(app.q1)*app.r22-sind(app.q1)*app.r12;
app.DD = sind(app.q1)*app.r11-cosd(app.q1)*app.r21;
app.q6 = real(atan2d(app.CC/sind(app.q5),app.DD/sind(app.q5)));
app.EE = cosd(app.q1)*app.r11+sind(app.q1)*app.r21;
app.FF = cosd(app.q5)*cosd(app.q6);
q234 = real(atan2d(app.r31*app.FF-sind(app.q6)*app.EE,app.FF*app.EE+sind(app.q6)*app.r31));
app.KC = cosd(app.q1)*app.px+sind(app.q1)*app.py-sind(q234)*app.d5+cosd(q234)*sind(app.q5)*app.d6;
app.KS = app.pz-app.d1+cosd(q234)*app.d5+sind(q234)*sind(app.q5)*app.d6;
c3 = (app.KS^2+app.KC^2-app.a2^2-app.a3^2)/(2*app.a2*app.a3);
s3 = sqrt(1-c3^2);
app.q3 = real(atan2d(s3,c3));
app.q2 = real(atan2d(app.KS,app.KC)-atan2d(sind(app.q3)*app.a3,cosd(app.q3)*app.a3+app.a2));
app.q4 = q234-app.q2-app.q3;
app.theta(1,:) = [app.q1 app.q2 app.q3 app.q4 app.q5 app.q6];

採用された回答

Voss
Voss 2024 年 4 月 14 日
  5 件のコメント
Dominik Gajdos
Dominik Gajdos 2024 年 4 月 14 日
I have solved it , but thanks for help anyway
Voss
Voss 2024 年 4 月 14 日
Glad you got it fixed.
Since using ./ instead of / fixed the error you asked about, please Accept this answer. Thanks!

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

その他の回答 (0 件)

カテゴリ

Help Center および File ExchangeLoops and Conditional Statements についてさらに検索

Community Treasure Hunt

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

Start Hunting!

Translated by