octave-bug-tracker
[Top][All Lists]
Advanced

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

[Octave-bug-tracker] [bug #54266] Error in leastqr


From: anonymous
Subject: [Octave-bug-tracker] [bug #54266] Error in leastqr
Date: Sun, 8 Jul 2018 02:40:08 -0400 (EDT)
User-agent: Mozilla/5.0 (Macintosh; Intel Mac OS X 10_13_5) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/67.0.3396.99 Safari/537.36

URL:
  <http://savannah.gnu.org/bugs/?54266>

                 Summary: Error in leastqr
                 Project: GNU Octave
            Submitted by: None
            Submitted on: Sun 08 Jul 2018 06:40:06 AM UTC
                Category: Octave Function
                Severity: 3 - Normal
                Priority: 5 - Normal
              Item Group: Regression
                  Status: None
             Assigned to: None
         Originator Name: Terence  Cosgrove 
        Originator Email: address@hidden
             Open/Closed: Open
         Discussion Lock: Any
                 Release: 4.0.3
        Operating System: Mac OS

    _______________________________________________________

Details:

0
down vote
favorite
I Have a simple octave script

%!  ## Example for linear inequality constraints
%!  ## (see also the same example in 'demo nonlin_residmin')
%!
Ae = 1.5; ale = 0.1; omegae = 0.9 ; phie = 1.5;
noise = 0.1;
t = linspace(0,10,50); 
n = noise*randn(size(t));
function y = f(t,p)
    y = p(1)*exp(-p(2)*t).*cos(p(3)*t + p(4));
endfunction
y = f(t,[Ae,ale,omegae,phie])+ n;
plot(t,y,'+; data;')
% NOW try fit
A0 = 2; al0 = 0; omega0 = 1; phi0 = pi/2 ;
[fr,p] = leasqr(t,y,[A0,al0,omega0,phi0],'f',1e-10);
p 
yFit = f(t,p);
plot(t,y,'+',t,yFit)
legend ('data','fit')
But I get an error in the leasqr package I have these packages installed
Package Name | Version | Installation directory
--------------+---------+----------------------- optim | 1.5.2 |
/Users/Terence/octave/optim-1.5.2 struct | 1.0.15 |
/Users/Terence/octave/struct-1.0.15

error: 'plot_cmds' undefined near line 296 column 3 error: called from leasqr
at line 296 column 3 testNonlinearfit at line 16 column 7

Any help much appreciated




    _______________________________________________________

Reply to this item at:

  <http://savannah.gnu.org/bugs/?54266>

_______________________________________________
  Message sent via Savannah
  https://savannah.gnu.org/




reply via email to

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