From b7398c7c3adb979791504a5418a48b7064ecf3e6 Mon Sep 17 00:00:00 2001 From: Eugeniy Mikhailov Date: Mon, 10 Oct 2011 23:18:46 -0400 Subject: Improved maximum detection --- xmds2/Nlevels_no_dopler_with_z_4wm/pp.m | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) (limited to 'xmds2/Nlevels_no_dopler_with_z_4wm') diff --git a/xmds2/Nlevels_no_dopler_with_z_4wm/pp.m b/xmds2/Nlevels_no_dopler_with_z_4wm/pp.m index 186d822..760aa82 100644 --- a/xmds2/Nlevels_no_dopler_with_z_4wm/pp.m +++ b/xmds2/Nlevels_no_dopler_with_z_4wm/pp.m @@ -60,7 +60,9 @@ title('I_3 before and after cell') [b, a]=butter(3, 0.05); I2_out_after=I2_out_1(:,end); I2_out_after_filtered=filtfilt(b,a,I2_out_after); -[m,max_pos_before]=max(I2_out_1(:,1) ); [m,max_pos_after]=max(I2_out_after_filtered); +settling_time=0.8; %uS +t_good_indx=t_1> min(t_1 + settling_time); +[m,max_pos_before]=max(I2_out_1(t_good_indx,1) ); [m,max_pos_after]=max(I2_out_after_filtered(t_good_indx)); delay_time=t_1(max_pos_after)-t_1(max_pos_before); printf('Second field delay time = %f uS\n',delay_time); @@ -76,8 +78,6 @@ ylabel('I_3 (1/s)^2') title('I_3 before and after cell') figure(4) -settling_time=0.5; %uS -t_good_indx=t_1> min(t_1 + 0.5); I2_max_in=max(I2_out_1(t_good_indx,1)); I2_max_out=max(I2_out_1(t_good_indx,end)); I2_in_norm=(I2_out_1(:,1))/I2_max_in; -- cgit v1.2.3