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 vue (au cours des 30 derniers jours)
Afficher commentaires plus anciens
Amna Awad
le 18 Nov 2020
Commenté : Star Strider
le 18 Nov 2020
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 commentaires
Réponse acceptée
Star Strider
le 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 commentaires
Plus de réponses (0)
Voir également
Catégories
En savoir plus sur Logical dans Help Center et File Exchange
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!