fitexample.mws

> with(plots):

Warning, the name changecoords has been redefined

> SampleData:=[[1, 2],[2, 4],[3, 6],[4, 3],[5, 5],[6, 8],[7, 4],[8, 5],[9, 6],[10, 1]];

>

SampleData := [[1, 2], [2, 4], [3, 6], [4, 3], [5, ...

> plot(SampleData);G:=%:

[Maple Plot]

> d1 := [1,2,3,4,5,6,7,8,9,10]:

> d2 := [2,4,6,3,5,8,4,5,6,1]:

> with(stats):

Warning, these names have been redefined: anova, describe, fit, importdata, random, statevalf, statplots, transform

> with(fit):

Warning, the names leastmediansquare and leastsquare have been redefined

>

> leastsquare[[x,y], y=a+b*x,{a,b}]([d1, d2]);

y = 21/5+2/55*x

> leastsquare[[x,y], y=a+b*x+c*sin(2*Pi*x/3)+d*cos(2*Pi*x/3),{a,b,c,d}]([d1, d2]);

y = 83/18-13/18*sqrt(3)*sin(2/3*Pi*x)+37/18*cos(2/3...

> plot([21/5+2/55*x,83/18-13/18*sqrt(3)*sin(2/3*Pi*x)+37/18*cos(2/3*Pi*x)],x=0..10,color=[blue,green]);C:=%:

[Maple Plot]

> display(G,C);

[Maple Plot]

>