%% Here is my code.
[data]=[0 0 0.050000000000000 1.108646244630E-01 0.100000000000000 2.217423074817E-01 0.150000000000000 3.325947375398E-01 0.200000000000000 4.434863433851E-01 0.250000000000000 5.543595496420E-01 0.300000000000000 6.652338361973E-01 0.350000000000000 7.761094191116E-01 0.400000000000000 8.869865144820E-01 0.450000000000000 9.978653384221E-01 0.500000000000000 1.108746107036E+00]';
x=data(:,1);
y=data(:,2);
k=0.3 %fixed
l=0.01 %variable, can have any value to fit the linear part
f=cos(k*l)^2 % function to fit
I will be highly grateful if anyone can help me on this problem. Thank you very much.
Best Answer