Matlab code

BHfit ›› Form Factors ›› vesicles ››
Parent Previous Next

function [I] =  f3_ves_ff(q,scaling,F_scal,F_rad,F_sigma,F_thick,S_phi)

global glob

glob.t=F_thick;

glob.RM=F_rad;

glob.sigma=F_sigma;


for i=1:size(q,2)

   glob.q=q(i);

   accuracy=1e-12;


   F(i)=F_scal.*scaling.*S_phi.*quad(@integrand,max([F_rad-3*F_sigma*F_rad 0]),F_rad+3*F_sigma*F_rad,accuracy);

end

%--------------------------------------------------------------------

function P=integrand(R)

   global glob

   q=glob.q;

   t=glob.t;    

   sigma=glob.sigma;

   RM=glob.RM;


   P=weight(R,sigma,RM).*16.*pi.^(2.0).*((R+t).^(3.0).*(sin(q.*(R+t))-(q*(R+t)).*cos(q.*(R+t)))./((q.*(R+t)).^(3.0))-R.^(3.0).*(sin(q.*R)-(q*R).*cos(q.*R))./((q.*R).^(3.0))).^2;  

         

%--------------------------------------------------------------------