invalid expression in the for loop
5 visualizaciones (últimos 30 días)
Mostrar comentarios más antiguos
OYH
el 22 de Nov. de 2019
Respondida: Walter Roberson
el 22 de Nov. de 2019
So, this is the project that I'm working on right now. And the problem is the for loop. It gets error message saying.Invalid expression. When calling a function or indexing a variable, use parentheses. Otherwise, check for mismatched delimiters.
I don't know what is the wrong part.
Also, one can give some suggestion for my code if it is really clumpsy.
Really appreciate if someone can help
0 comentarios
Respuesta aceptada
Walter Roberson
el 22 de Nov. de 2019
You are missing a ) after the / in the line you indicate. Count the brackets
(1+(velocity(1,i)^2).^(3/2)
1 2 3 2 1 2 1
You need one more ) character.
I suspect you could instead use
(1+velocity(1,i)^2).^(3/2)
0 comentarios
Más respuestas (0)
Ver también
Categorías
Más información sobre Matrix Indexing en Help Center y File Exchange.
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!