I have this error Index in position 1 exceeds array bounds.

3 views (last 30 days)
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 Comments
Walter Roberson
Walter Roberson on 25 Aug 2022
We do not have your input files, and we do not know what parameters you are calling the function with.

Sign in to comment.

Accepted Answer

Walter Roberson
Walter Roberson on 25 Aug 2022
Every one of your .dat files have text headers on them, but in every case you are using textscan() with %f format and no Headerlines
For those files, you should be using
'HeaderLines', 53
  4 Comments
Rigo ZOO
Rigo ZOO on 25 Aug 2022
Hi Walter,
Great, thanks again, it works and I understood the notion about the scalar definition and the number of iteration
Regards,
Rigo

Sign in to comment.

More Answers (1)

Rigo ZOO
Rigo ZOO on 25 Aug 2022
Sorry, but the dat file are unsupported on Matlab forum. I changed the file extension to txt, just change back to dat file before use in this script.
U = 8m/s
Time = 100s
B = 3
Omega = 1.0159
rho = 1.25
maxdev = 0.00001
Regards,
Rigo

Products


Release

R2019b

Community Treasure Hunt

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

Start Hunting!

Translated by