Where to put the period in this expression?
45 views (last 30 days)
Show older comments
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?
0 Comments
Accepted Answer
Image Analyst
on 16 Feb 2012
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)
2 Comments
Image Analyst
on 16 Feb 2012
OK. If they're scalars it works either way. You don't need the period but it doesn't hurt or break it either.
More Answers (1)
Parker Bodin
on 14 Sep 2017
y=1/(x^2-x-6)
1 Comment
Image Analyst
on 14 Sep 2017
Huh? Are you sure you were answering this five and a half year old question, or some other one?
See Also
Categories
Find more on Matrices and Arrays in Help Center and File Exchange
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!