function CDFmatch( outFile, inFile, cdf_abscissa )

N_train = length( cdf_abscissa );

[ x, fs ] = readsph( inFile );

N_test = length( x );

[ ~, I ] = sort( x );

output_indices = round( N_train * ( 1 : N_test ) / N_test );

x_out = x;

x_out( I ) = cdf_abscissa( output_indices );

x_out = 0.98 * x_out / max( abs( x_out ) );

wavwrite( x_out, fs, outFile );
