function dw = state_space_eqn(~,w,mass,stiffness_f, stiffness_r, damping_f, damping_r, l_f, l_r)
A = [0 0 1 0; 0 0 0 1; ((-stiffness_f - stiffness_r)/mass) ((-stiffness_f*l_f + stiffness_r*l_r)/mass) ((-dammping_f - damping_r)/mass) ((-damping_f*l_f + damping_r*l_r)/mass)];....
((-stiffness_f*l_f + stiffness_r*l_r)/inertia) ((-stiffness_f*l_f^2 - stiffness_r*l_r^2)/inertia) ((-damping_f*l_f + damping_r*l_r)/inertia) ((-damping_f*(l_f^2) - damping_r*l_r^2)/inertia)]
dw = A*w;
end
I'm getting parse error at '(' at the bolded bracket only.
How can i rectify it?

댓글 수: 2

Ameer Hamza
Ameer Hamza 2020년 4월 26일
Can you show complete definition of vector A. If it is long, then you can attach an .m file.
Hi Ameer,
I have attached the file

댓글을 달려면 로그인하십시오.

 채택된 답변

Steven Lord
Steven Lord 2020년 4월 26일

0 개 추천

The square bracket at the end of the first line where you define A ends that definition. The square bracket at the end of the second line is therefore unmatched. You probably want to delete that first square bracket.

추가 답변 (0개)

카테고리

도움말 센터File Exchange에서 Specialized Power Systems에 대해 자세히 알아보기

제품

릴리스

R2019b

태그

Community Treasure Hunt

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

Start Hunting!

Translated by