MATLAB: Where to put the period in this expression

arrayerrorfunctionmtimesperiodvector

RV = (w*r*c)/sqrt((1-w^2*l*c)^2+(w*r*c)^2)
w is the vector I need to pass through the expression
I've tried about 5 different combinations and keep getting the mtimes error.
Thanks for the help.
Also, is there a rule of thumb for the placement of the period(s) in an expression such as this?

Best Answer

If you want an element by element operation, use a period. If you want a matrix style operation, just use the operator (*,/,^) without the period. I trust you know the difference between element-by-element and matrix operations. To answer your question we'd need to know which variables are scalars and which are matrices. I'd guess that you want periods in front of all of them, but that's my guess.
RV = (w.*.r.*c)./sqrt((1-w.^2.*l.*c).^2+(w.*r.*c).^2)
Related Question