help-octave
[Top][All Lists]
Advanced

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

Re: testing lsqcurvefit


From: Olaf Till
Subject: Re: testing lsqcurvefit
Date: Thu, 6 Apr 2017 15:41:18 +0200
User-agent: Mutt/1.5.23 (2014-03-12)

On Thu, Apr 06, 2017 at 05:09:52AM -0700, siko1056 wrote:
> Hello Dominique Richard,
> 
> The error is subtle. I guess you put the code in some file and executed it.
> Doing this you defined a function file, not a script file, as one might
> expect. Therefore Octave asks you to provide the "p" and "x", and the code
> after "endfunction" would be ignored. The reason is, that the first
> non-comment keyword is "function" in the third line (see
> https://www.gnu.org/software/octave/doc/interpreter/Script-Files.html for
> details). To fix this, just write something like `disp("My cool example")`
> or alike before the "function" keyword, then you defined a script file.
> 
> It works for the package maintainer as demo function, as the code appears in
> another context there.
> 
> Maybe you report this as a documentation bug?

Thanks for noticing, have changed order of instructions in the demos
of the two concerned functions to avoid this problem.

Olaf

-- 
public key id EAFE0591, e.g. on x-hkp://pool.sks-keyservers.net

Attachment: signature.asc
Description: Digital signature


reply via email to

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