I'm writing a function to fit a curve.Here is what I wrote:
temp1=A/w*sqrt(4*ln(2)/PI);
if (x{temp2=exp(-4*ln(2)*(x-xc)^2)*(abs(t-(x-xc))^p1);
y=temp1*integrate(temp2)}
else
{temp2=exp(-4*ln(2)*(x-xc)^2)*(abs(t-(x-xc))^p2);
y=temp1*integrate(temp2)}Origin kept on giving me an error message saying that there are too many bad functional evaluations and that parameters may be out of range. Anyone have any idea what is wrong?