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);

채택된 답변

Star Strider
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.

추가 답변 (0개)

카테고리

Help CenterFile Exchange에서 Programming에 대해 자세히 알아보기

Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!

Translated by