What is wrong with my code it keeps telling me that i have 'Error: File: labmaterials.m Line: 67 Column: 109 Invalid expression. When calling a function or indexing a variable, use parentheses. Otherwise, check for mismatched delimiters.
1 view (last 30 days)
Show older comments
Ms(iii)=2/pi*(w1*log*[tan*[acos*[w1/l_vector]]+l_vector/w1]+l_vector*(pi/2)-l_vector*acos*[w1/l_vector])(iii);
0 Comments
Accepted Answer
Star Strider
on 18 Nov 2020
The problems are too many to specifically enumerate:
Ms(iii)=2/pi*(w1*log*[tan*[acos*[w1/l_vector]]+l_vector/w1]+l_vector*(pi/2)-l_vector*acos*[w1/l_vector])(iii);
I have no idea what the ‘(iii)’ subscript refers to (I am guessing ‘l_vector’) however it cannot just sit there at the end of the statement, since it does not specifically refer to anything.
I have no idea if this will work and do the calculation you want, however the parentheses and function calls all appear to agree:
Ms(iii) = 2/pi*(w1*log(tan(acos(w1/l_vector(iii)))+l_vector(iii)/w1)+l_vector(iii)*(pi/2)-l_vector(iii)*acos(w1/l_vector(iii)));
Note the changes. Make appropriate edits to get the result you want.
2 Comments
More Answers (0)
See Also
Categories
Find more on Logical 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!