Question: fitting a function to set of points

Hi all,

i am a biggener in maple and have a homework to be solved and i do need help if possible.

well i would like to fit a given function to a set of given points.

the function is                                     (k cos(x - mu))
                                             p(x) := ------------------
                                                           2 Pi BasselJ(0, k)


the coordination of the points are (0,5), (2,1), (3,0.6)

i dont know if i was thinking right but i have written somthing and have problem in the plot step ...

> restart;x:=<0,2,3>; y:=<5,1,0.6>;
> eq:=a*exp^(k*cos (x-mu))/(2*Pi*(BesselJ(0,k)))=y;
> eq:=fit[leastsquare[[x,y],eq,{a,k,mu}]];
> eval (eq);

> p1:=pointplot([seq([x[i],y[i]],i=1..3)]):
> plot(eq(x,y),p3);
Error, (in plot) invalid arguments is the message what i am getting..

I would appreciate any help

Thanks in advance




Please Wait...