[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: Evaluating a string in octave
From: |
Muthiah Annamalai |
Subject: |
Re: Evaluating a string in octave |
Date: |
Mon, 29 Jan 2007 10:08:53 -0600 |
On Mon, 2007-01-29 at 15:06 +0100, antonio palestrini wrote:
> If I interpret the question correctly, you have a string
> in the variable q .. so something like
>
> q = " 15 * (0.5)^(K) -35 * (0.7)^(K) + 20 * (1)^(K)";
> (note: strings are inside commas ".....")
>
> in this case just type
>
> k=5; eval (q)
>
or rather, K=5; eval(q)
or in CVS 2.9.8+ (and maybe even earlier) the following
works:
either: z=inline(q); z(5)
or: inline(q)(5);
-Muthu
- Wikibook on octave, Nicolas Pettiaux, 2007/01/29
- Re: Wikibook on octave, David Bateman, 2007/01/29
- Evaluating a string in octave, Doug Stewart, 2007/01/29
- Re: Evaluating a string in octave, antonio palestrini, 2007/01/29
- Re: Evaluating a string in octave,
Muthiah Annamalai <=
- Re: Evaluating a string in octave, antonio palestrini, 2007/01/29
- Re: Evaluating a string in octave, antonio palestrini, 2007/01/29
- Re: Evaluating a string in octave, David Bateman, 2007/01/29
- Re: Evaluating a string in octave, Doug Stewart, 2007/01/29
Re: Wikibook on octave, Nicolas Pettiaux, 2007/01/29
Re: Wikibook on octave, Nicolas Pettiaux, 2007/01/30