MATLAB: Parse error while defining a state vector

MATLABparse

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?

Best Answer

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.
Related Question