I have a problem with a curve fitting in gnuplot with my data:
If I use these commands:
plot "sky.txt"
f(x)=A*exp(-(t)/(sin(x)))+B
fit f(x) "sky.txt" u 1:2 via A,t,B
plot "sky.txt", f(x)
Then I get strange results, like errors of +- 1093% When I'm plotting this I get a very strange plot.
This is measured data. I have no idea what's wrong in here. Thank you for help.

xseems to be your independent variable and you want to fit an exponential decay. So, are you sure your function shouldn't be something like:f(x)=A*exp(-(x)/(sin(t)))+B? Please provide the data if you want it to be reproduced and tested. - theozhxis the angle and it should be in degrees?! If yes, then you have to tell gnuplotset angle degrees. Checkhelp angles. Default is radians. - theozh