[Top][All Lists]

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: leasqr error

From: Martin Helm
Subject: Re: leasqr error
Date: Wed, 14 Nov 2012 17:34:13 +0100
User-agent: Mozilla/5.0 (X11; Linux x86_64; rv:16.0) Gecko/20121025 Thunderbird/16.0.2

Am 14.11.2012 16:15, schrieb Olaf Till:
> This should be fixed in the latest optim package. (But the OP had a
> different problem.) Olaf 

No he had no different problem, look at the versions of optim and
control he has 2.3.52 and 1.2.0 the load both and execute his code (not
the last line which was anyway not correct)

octave:2> pkg load control
octave:3> pkg load optim
octave:4> x=linspace(0, 5);
octave:5> y = 1./(1 + 1.2*x.^(1.8)) + randn(1,100)*0.03;
octave:6> function y = ffun(x, p)
> y = 1./(1+p(1)*x.^p(2));
> endfunction
octave:7> p = [0.5 0.0];
octave:8> [yfit pfit cvg iter] = leasqr(x, y, p, "ffun");
error: Invalid call to options.  Correct usage is:

 -- Function File: OPT = options ("KEY1", VALUE1, "KEY2", VALUE2, ...)
error: called from:
error:   /usr/share/octave/3.6.3/m/help/print_usage.m at line 87, column 5
error:   /usr/share/octave/packages/control-2.3.52/options.m at line 68,
column 5
error: evaluating argument list element number 1
error:   /usr/share/octave/packages/optim-1.2.0/leasqr.m at line 574,
column 5

same code without a pkg load control works and that is absolutely
exactly the error he got, but he just misplaced at which line it was thrown.

reply via email to

[Prev in Thread] Current Thread [Next in Thread]