I am working on a nonlinear dynamics mechanism using the Euler-Lagrangian for derivation of the equation of motion.
I am using the symbolic toolbox to deal with all of the nasty differentiation involved and for a part of this derivation it would be highly convenient to take the scalar dot product of two of my [2x1] syms.
Matlab gives the following error:
Error using dot (line 33) A and B must be same size.
Error in BistableDerivation (line 51) Q1 = dot(F1, simplify(diff(r1,x1))) + dot(F2, simplify(diff(r2,x1))) ...
From my workspace: F1 is a 2x1 sym (I have not yet given values to this vector, assignment was made by F1 = sym('F1',[2 1]);) r1 is a 2x1 sym x1 is a 1x1 sym
simplify(diff(r1, x1)) also definitely returns a 2x1 sym
Any help would be thoroughly appreciated - I know I could manually write the dot product out, however this statement continues and a dot product really would be ideal here.