%data z datasheetu

data = load('MGSF2N02EL.txt');             
N = size(data,1);

%pociatocny odhad

M0(1) = 13;             %KP
M0(2) = 0.7;            %VT0
M0(3) = log(0.02);      %LAMBDA
M0(4) = log(0.010);     %ln(RS)
M0(5) = log(0.010);     %ln(RD)

[M,F] = fminsearch('errorI',M0,options,data);

%zobrazenie

PlotI(data,M);

