boundary.m

来自「算荧光衰减时间或者寿命的软件.matlab语言编写.」· M 代码 · 共 25 行

M
25
字号
function [Startime, EndTime,lb,ub] = Boundary(file,InstCurveNum,Start);

raw = load(file);
IRF = raw(:,InstCurveNum);
Decay = raw(:,Start);

fig = figure;
semilogy(IRF); hold on; semilogy(Decay,'g');
pause(0.001);
rectangle = getrect(fig);

Startime = round(rectangle(1));
EndTime = round(rectangle(1) + rectangle(3));



%%%%%%%%%%%%%% boundary conditions %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
AmpL = [0;0;0];               AmpU = [1;1;1];     % amplitude
LifeL = [1e-4;1e-4;1e-4];     LifeU = [5;5;10];  % lifetime
TShiftL = [-0.3];                   TShiftU = [0.3];          % time shift (ns)
BackL = [-5000;-5000];                BackU = [5000;5000];        % bkg shift
%%%%%%%%%%%%%%%%%%%   End %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%

lb = [AmpL;LifeL;BackL;TShiftL]; % lower boundary
ub = [AmpU;LifeU;BackU;TShiftU]; % upper boundary

⌨️ 快捷键说明

复制代码Ctrl + C
搜索代码Ctrl + F
全屏模式F11
增大字号Ctrl + =
减小字号Ctrl + -
显示快捷键?