필터 지우기
필터 지우기

Error using / Matrix dimensions must agree app designer

조회 수: 4 (최근 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 CenterFile Exchange에서 Loops and Conditional Statements에 대해 자세히 알아보기

Community Treasure Hunt

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

Start Hunting!

Translated by