[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Octave-bug-tracker] [bug #62393] nonlin_curvefit fails in 7.1.0 with "f
From: |
anonymous |
Subject: |
[Octave-bug-tracker] [bug #62393] nonlin_curvefit fails in 7.1.0 with "function called with too many inputs" |
Date: |
Mon, 2 May 2022 12:13:11 -0400 (EDT) |
URL:
<https://savannah.gnu.org/bugs/?62393>
Summary: nonlin_curvefit fails in 7.1.0 with "function called
with too many inputs"
Project: GNU Octave
Submitted by: None
Submitted on: Mon 02 May 2022 04:13:09 PM UTC
Category: Octave Forge Package
Severity: 3 - Normal
Priority: 5 - Normal
Item Group: Segfault, Bus Error, etc.
Status: None
Assigned to: None
Originator Name: RandomDude
Originator Email: riander73@gmail.com
Open/Closed: Open
Release: 7.1.0
Discussion Lock: Any
Operating System: Microsoft Windows
_______________________________________________________
Details:
All my scripts that use "nlinfit" and "lsqcurvefit" fail with the following
error:
error: @<anonymous>: function called with too many inputs
error: called from
nonlin_curvefit>@<anonymous>
__nonlin_residmin__>@<anonymous> at line 316 column 42
__dfdp__ at line 304 column 15
__nonlin_residmin__>@<anonymous> at line 329 column 26
__jacobian_constants__>@<anonymous> at line 121 column 11
__lm_svd__ at line 196 column 9
__nonlin_residmin__ at line 452 column 25
nonlin_curvefit at line 83 column 22
nlinfit at line 169 column 20
Here is example code that results in error, taken from
"https://octave.sourceforge.io/optim/function/nlinfit.html":
modelfun = @(b, x) (b(1) + b(2) * exp (- b(3) * x));
%% actual value
beta_without_noise = [1; 3; 2];
x = [3.49622; 0.33751; 1.25675; 3.66981; 0.26237; 5.51095; ...
2.11407; 1.48774; 6.22436; 2.04519];
y_actual = modelfun (beta_without_noise, x);
noise = [0.176110; -0.066850; 0.231000; -0.047570; -0.108230; ...
0.122790; 0.062940; 0.151510; 0.116010; -0.097460];
y_noisy = y_actual + noise;
%% initial guess
beta0 = [2; 2; 2];
%% weights vector
weights = [5; 16; 1; 20; 12; 11; 17; 8; 11; 13];
[beta, R, J, covb, mse] = nlinfit (x, y_noisy, modelfun, beta0)
[beta_w, R_w, J_w, covb_w, mse_w] = nlinfit (x, y_noisy, modelfun, beta0, [],
"weights", weights)
_______________________________________________________
Reply to this item at:
<https://savannah.gnu.org/bugs/?62393>
_______________________________________________
Message sent via Savannah
https://savannah.gnu.org/
- [Octave-bug-tracker] [bug #62393] nonlin_curvefit fails in 7.1.0 with "function called with too many inputs",
anonymous <=