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 次查看(过去 30 天)
显示 更早的评论
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 个评论
采纳的回答
Star Strider
2020-11-18
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 个评论
更多回答(0 个)
另请参阅
类别
在 Help Center 和 File Exchange 中查找有关 Logical 的更多信息
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!