Hello, I m new at Matlab and have a simple question:
I wrote a short m-file function with the purpose of showing me the exact index where 3 conditions are fulfilled.
If I run it, Matlab says:
Index in position 2 exceeds array bounds.
Error in cutdataB (line 3)
The confusing part is coming now:
Entering the third line alone, with filling in VP=2, VT=2, PH=2, results in Matlab showing the correct index vector
So, what is wrong with my m-file?
(If you re wondering, actually it's just a simplified version of another m file that I'm going to write. But in order to get that running, I m trying to at least manage to create an easy one)