On Mon, 14 Jun 2010, Hugo Coolens wrote:
< Here is my input-file:
< 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), [a,0,100]);
Hugo, what if you try
define(mse1(a), subst(b=10,mse));
instead of the line above that uses ''.
Are you 'load'ing this input file, by any chance?
Leo
--
The University of Edinburgh is a charitable body, registered in
Scotland, with registration number SC005336.