Code covered by the BSD License  

Highlights from
Lognormal Perfusion Model

image thumbnail

Lognormal Perfusion Model

by

 

13 Mar 2013 (Updated )

Fit disruption replenishment time-intensity data with the lognormal perfusion model

Wsinc(x,HW,Delay,Amp);
%Square windowed sinc function
 % HW = Half width of Sinc^2 function (from the peak to the zero crossing)                                                                                                                 
 
 
function [S]= Wsinc(x,HW,Delay,Amp);
 
 Offset = 0;
 
 
% Delay = Delay+HW;
 
    for i=1:length(x)
        
        X = x(i)/HW - (Delay+HW)/HW ;
  
        if X ~= 0
            S(i)=Amp*(sin(pi*(X))/(pi*X)).^2 + Offset;
        elseif X==0
            S(i) = Amp;
       	end
    end
    
 %This next part applies a square window function around the first zero crossing   
    
    for i = 1:length(x)
        if x(i)<Delay || x(i) > Delay+2*HW
            S(i) = 0;
        else
        end
    end

Contact us