function [ func_insulin ] = select_insulin( type, Egyseg, dt )


switch type
    case 0
        func_insulin=zeros(1, 10);
    case 1
        t=0:dt:8;
		sigma=1.5;
		pd = makedist('Rayleigh','b',sigma);
		func_insulin=pdf(pd,t);
        C=1/trapz(func_insulin);
        func_insulin = Egyseg * C * func_insulin;
    case 2
        t=0:dt:10;
        sigma=2.2;
		pd = makedist('Rayleigh','b',sigma);
		func_insulin=pdf(pd,t);
        C=1/trapz(func_insulin);
        func_insulin = Egyseg * C * func_insulin;
    case 3
        t=0:dt:18;
        sigma=5;
		pd = makedist('Rayleigh','b',sigma);
		func_insulin=pdf(pd,t);
        C=1/trapz(func_insulin);
        func_insulin = Egyseg * C * func_insulin;
	%case 4
        %t=0:dt:9;
        %sigma=4.2;
		%func_insulin=(t.*e^(-t.^2/(2*(sigma^2))))/(sigma^2);
	%case 5
        %t=0:dt:26;
        %sigma=8;
		%func_insulin=exp((-(t-13).^8/(2*sigma^8)));
    otherwise
        disp('hiba: nincs ilyen tipus');
end



end

