[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
leasqr: error: weighted residuals are not real
From: |
oxy |
Subject: |
leasqr: error: weighted residuals are not real |
Date: |
Thu, 7 Apr 2016 10:12:03 +0200 |
Hi Guys,
this is an old problem. I always spot it again.
There are old email threads about it. They say it is a bug.
I could not find discussions since 2012.
Is it realy a bug or am i doing sth wrong?
working with Octave, version 4.0.1, optim Version: 1.5.0
Thanks very much in advance!
%====== here a code example ================
clear all
M=[
5.3900e-01 0.0000e+00
1.0600e+00 1.8838e-01
1.5730e+00 2.7787e-01
2.0900e+00 3.3691e-01
2.6070e+00 3.8265e-01
3.1240e+00 4.1204e-01
3.6410e+00 4.3912e-01
4.1580e+00 4.6368e-01
4.6750e+00 4.8223e-01
5.1920e+00 4.9765e-01
5.7080e+00 5.1288e-01
6.2250e+00 5.2316e-01
6.7420e+00 5.3964e-01
7.2590e+00 5.4866e-01
7.8070e+00 5.6333e-01
8.3240e+00 5.7266e-01
8.8410e+00 5.8163e-01
9.3580e+00 5.9472e-01
9.8750e+00 6.0218e-01
1.0392e+01 6.0394e-01
1.0959e+01 6.1534e-01
1.1473e+01 6.2155e-01
1.1990e+01 6.2744e-01
1.2507e+01 6.3283e-01
1.3023e+01 6.3878e-01
1.3540e+01 6.4856e-01
1.4061e+01 6.5112e-01
1.4574e+01 6.5670e-01
1.5091e+01 6.6284e-01
1.5608e+01 6.6585e-01
1.6125e+01 6.7262e-01
1.6642e+01 6.7582e-01
1.7159e+01 6.8428e-01
1.7676e+01 6.8691e-01
1.8193e+01 6.9230e-01
];
Mt=@(t,p) p(1) * (p(2) - p(3)*exp(-((p(4)*(t+p(5))).^p(6))));
pin=[1.1; 0.9; 0.7; 0.1; 0; 0.6];
stol=0.0000001;
niter=10000;
wts = (1/sqrt(M(:,2)))';
dFdp='dfdp';
dp=0.001 * ones (size (pin));
options.bounds=[0.5 1.5; 0.5 1.5 ; 0.5 1.5 ; 1e-16
1e16; -10 50; 0.1 1.2 ];
[f, pfound, cvg, iter]=leasqr(M(:,1), M(:,2), pin, Mt, stol, niter
,wts, dp, dFdp, options);
- leasqr: error: weighted residuals are not real,
oxy <=