I have this error Index in position 1 exceeds array bounds.
Mostrar comentarios más antiguos
I have a script, when I run it, I have the eabove error:
Index in position 1 exceeds array bounds.
Error in BEM (line 245)
angle=foilarray{airfoil,1}(aoacounter,1);
(Line 245 is this one) ----> angle=foilarray{airfoil,1}(aoacounter,1);
I read solution regarding this topic but no answer was helpful
6 comentarios
Torsten
el 25 de Ag. de 2022
Before the command
angle=foilarray{airfoil,1}(aoacounter,1)
insert the lines
foilarray{airfoil,1}
size(foilarray{airfoil,1})
aoacounter
What's the output from MATLAB ?
Walter Roberson
el 25 de Ag. de 2022
Editada: Walter Roberson
el 25 de Ag. de 2022
dbstop if error
run the code. When it stops examine
size(foilarray)
size(foilarray{1})
Rigo ZOO
el 25 de Ag. de 2022
Walter Roberson
el 25 de Ag. de 2022
Your code assumes that each foilarray cell entry contains at least one value, but foilarray{3,1} is empty.
Rigo ZOO
el 25 de Ag. de 2022
Walter Roberson
el 25 de Ag. de 2022
We do not have your input files, and we do not know what parameters you are calling the function with.
Respuesta aceptada
Más respuestas (1)
Rigo ZOO
el 25 de Ag. de 2022
Categorías
Más información sobre Matrix Indexing en Centro de ayuda y File Exchange.
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!