problem with fitting data using lsquares




On Mon, 14 Jun 2010, Hugo Coolens wrote:

< I replaced plot2d (mse1, [a, 0, 100]); by plot2d(mse1(a), [a,0,100]);
< but I still get the same error-message:
< (%i5)
< gnuplot> plot [0.:100.]'/home/coolens/maxout.gnuplot_pipes' index 0 notitle
< with lines 3
< 
< ^
 > <
< > m:matrix([100,16000],[200,8000],[500,3636],[1000,1818],[2000,870],[5000,323],[10000,160],[20000,83],[50000,33],[100000,20]);
< > < lsquares_estimates (m, [x, y], y = sqrt(a^2 + (10e7/(2*%pi*x*b))^2),[a,
< > b],
< > < initial=[10, 10]);
< > < /* => [[a = 19.2898942613692, b = 9.89381119455951]]*/
< > < /* b = 10 is the exact value for b.*/
< > < /* I'll construct the mean square error as a function of a alone*/
< > < /* and then plot it. */
< > < mse : lsquares_mse (m, [x, y], y = sqrt(a^2 + (10e7/(2*%pi*x*b))^2));
< > < mse1 (a) := ''(subst (b=10, mse));
< > < plot2d (mse1, [a, 0, 100]);
 
Could you show us the output of the preceding commands, beginninng with
the line where you define m.

Note, too, that you may want to upgrade your version of Maxima. The 
current version is 5.21.1.

Leo

-- 
The University of Edinburgh is a charitable body, registered in
Scotland, with registration number SC005336.