Matlab question subtracting vectors.
@mathmate
How do I subtract m*aG and g, those are both vectors.
type aG instead of ag
It says array size must match. I think aG needs to be transposed?
no no, you put the wrong variable in "ag" is undefined
its suppose to be aG not ag it makes a huge difference
aG is a vector. It's the double cross product.
I changed it to aG
B scalar?
Yes
B = beta = angle
FRA= ... should work then since they're both 3x1
Array sizes must match. Error in sym/privBinaryOp (line 946) Csym = mupadmex(op,args{1}.s, args{2}.s, varargin{:}); Error in - (line 7) X = privBinaryOp(A, B, 'symobj::zip', '_subtract');
er... since you're dealing with symbolic math, are you sure you can use the cross function?
Yes, I've seen my friend do it and I was able to find HG and dHG just fine.
dont know what else to say, other than use the debug function in order to determine the exact point your code is failing since it doesnt seem obvious
This looks good to you though? g = [(m*g*cos(B)); -(m*g*sin(B)); 0]; FRA = m*aG - g; FRA = minus(m*aG - g)
I found the error!
mind sharing?
Suppose to be FRA = minus(m*aG , g), not m*aG - g
ah ok would not have figured that out from here without matlab
Join our real-time social learning platform and learn together with your friends!