% Matt Fetterman 2006 % this program finds the value of t that will minimize the noise. function [t1,t2,SNR]=min_SNR_Out_1(indices,SumTime,pow,NumPoints) restNoise=0; t_0=0;t_1=SumTime; % this line here finds the time values to minimize the noise. uses the % built in Matlab minimizer.The functional to minimize is given in % min_Noise_Out_1. tMin=fminbnd('min_Noise_Out_1',t_0,t_1,[],indices,SumTime,pow,NumPoints,restNoise); t1=tMin;t2=SumTime-tMin; Noise=Noise_Out_1(indices,t1,t2,pow); Signal1=indices(1)^pow*t1; Signal2=indices(2)^pow*t2; Signal1=1;Signal2=1; Signal=Signal1+Signal2; SNR=Signal./Noise;