I have a GUI with a timer. I start the timer, and it randomly will stop at some point while it is running and give the error: Index exceeds matrix dimensions. Error while evaluating TimerFcn for timer 'timer-1'
I do not think there is actually a matrix index it is accessing that is grater than the length of the index for a few reasons:
-All the matrices it accesses are much longer than the index it should be accessing at the time it stops
-The timer stops at different times every time I run it, which makes me feel like there is not a particular index limit that is actually causing problems
-I have commented out all the actual code the timer runs (so the timer literally just runs with no callbacks) and it still will stop at random times with the same error message.
I have no idea how to fix this. Is this just a buggy feature in matlab, or is there something else wrong with what I am doing.
I would also appreciate some help in figuring out how to better debug my code, as the error message does nothing to help me (it gives no line where the error occurs)