https://www.mathworks.com/help/comm/ref/quantiz.html -- signal processing toolbox
https://www.mathworks.com/help/matlab/ref/double.discretize.html -- general numeric
If you use discretize then you get out bin numbers, which you can use to index the edge vector that you passed in, in order to get out the value of the "beginning" of the edge.
Another hint I would give is to use the 'native' option for audioread()
