As the title says, I keep on getting this error and not too sure how to fix it, as I am not too familiar with MATLAB.
A shortened version of the code is as followed:
Ultimately, I will have three different functions, F1, F2, and F3, that call T(i-1), T(i), and/or T(i+1) as i runs from 2 to (L-1), but the T(1) will be given, which is why I begin my loop with T(i-1), so I can call the previous T(i) value for the new i, if that makes sense.
But to make things simple, I just included this smaller, simplified version since I'm assuming if I can fix this error I can figure out what to do for the longer code.
Any help is appreciated, thank you. I can give more details if need be as well.