From 5ffe17e19ac9a95ede0a9129be7943599f2c2c96 Mon Sep 17 00:00:00 2001 From: Eugeniy Mikhailov Date: Wed, 19 Dec 2012 16:28:42 -0500 Subject: better estimate of the pulse amplitude for fit --- xmds2/realistic_Rb_and_fields/find_pulse_center.m | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/xmds2/realistic_Rb_and_fields/find_pulse_center.m b/xmds2/realistic_Rb_and_fields/find_pulse_center.m index 11b3395..2aef99d 100644 --- a/xmds2/realistic_Rb_and_fields/find_pulse_center.m +++ b/xmds2/realistic_Rb_and_fields/find_pulse_center.m @@ -1,7 +1,7 @@ function [pc, pc_err] = find_pulse_center(x,y) f=fittype(@(A,x0,width, x) A.*exp(-((x-x0)/width).^2) ); -pin=[1e4, 0, .4e-6]; % A, x0, width +pin=[max(y), 0, .4e-6]; % A, x0, width [fitobject,gof] = fit (x, y, f, 'StartPoint', pin); ci = confint(fitobject); -- cgit v1.2.3