help-octave
[Top][All Lists]
Advanced

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

Re: Creating "sequential variable names"


From: Sergei Steshenko
Subject: Re: Creating "sequential variable names"
Date: Mon, 18 Oct 2010 13:06:00 -0700 (PDT)


--- On Mon, 10/18/10, John W. Eaton <address@hidden> wrote:

> From: John W. Eaton <address@hidden>
> Subject: Re: Creating "sequential variable names"
> To: "AlbFrigerio" <address@hidden>
> Cc: address@hidden
> Date: Monday, October 18, 2010, 8:48 AM
> On 18-Oct-2010, AlbFrigerio wrote:
> 
[snip]
> If you find yourself using eval for what seem should be
> normal
> programming tasks, then you should immediately think there
> must be a
> better way, and nearly always there is.
[snip]
> jwe
> 

I had difficulties using 'plot'. I.e. I needed a variable number 'X, Y, FORMAT' 
triplets, and I was generating a string representing the 'plot'
command to be ultimately executed, then I used 'eval' to execute the
command.

The triplets were generated in a loop and the string was filled in teh same 
loop.

So, which is a better way and is it described in the documentation ?
I am still using octave-3.0.5 and reading 'help plot' I didn't find a way
without 'eval'.

Thanks,
  Sergei.


      


reply via email to

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