What I'd like to do is get Matlab to generate a list of values starting at 0 and going up until the size of the array and so that when the value shows up it converts into this list of values.
For instance:
-0.7500 -0.5000 -0.2500 0 0.2500 0.5000 0.7500 1.0000
I want this to generate:
0 1 2 3 4 5 6 7
So that when I enter the value -0.75 it'll convert it to 0 and so on. I saw my teacher use a Matlab function that did this automatically but unfortunately he hasn't provided the name of the function (simply said it exists). In case no one knows this function I'll just write my one but I'd prefer something written by the Matlab developers.