help-octave
[Top][All Lists]
Advanced

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

Re: independent variable in function for leasqr


From: David Bateman
Subject: Re: independent variable in function for leasqr
Date: Tue, 10 Jul 2007 12:14:28 +0200
User-agent: Thunderbird 1.5.0.7 (X11/20060921)

address@hidden wrote:
> Hi James,
> thanks again, my code runs :-)
> Just one last question, I cannot declare a function using letter constants:
>
> octave-2.1.73:12> k = 2;
> octave-2.1.73:13> F = inline("k*x^2", "x");
> octave-2.1.73:14> F(2)
> error: `k' undefined near line 12 column 6
> error: evaluating binary operator `*' near line 12, column 7
> error: called from `?unknown?'
>
> This is not crucial, but would just look better in my script.
> Maybe is your version of octave newer and can do that.
> Is it that?
> Thanks a lot anyway, the code is running ...
>   
The ability to have a private workspace associated with an anonymous or
inline function was I believe introduced in 2.9.10.. Therefore for the
above you either need to use 2.9.10 or later, or replace the k with a
constant..

D.

-- 
David Bateman                                address@hidden
Motorola Labs - Paris                        +33 1 69 35 48 04 (Ph) 
Parc Les Algorithmes, Commune de St Aubin    +33 6 72 01 06 33 (Mob) 
91193 Gif-Sur-Yvette FRANCE                  +33 1 69 35 77 01 (Fax) 

The information contained in this communication has been classified as: 

[x] General Business Information 
[ ] Motorola Internal Use Only 
[ ] Motorola Confidential Proprietary



reply via email to

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