This function calculates the moving average along that vector. It can be used to smooth a series.
For a function y=f(x), this script looks for all the "x" values for a desired value of "y" (y0).
findvalues(vector,yvalue)- FINDVALUES function [valX,posX]=findvalues(vector,y0value)