help-octave
[Top][All Lists]
Advanced

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

Re: load command question


From: Stefan van der Walt
Subject: Re: load command question
Date: Mon, 8 May 2006 19:17:22 +0200
User-agent: Mutt/1.5.9i

On Sun, May 07, 2006 at 10:31:53PM -0400, Bill Denney wrote:
> On Mon, 8 May 2006, Stefan van der Walt wrote:
> 
> >x = "1"
> >filename = "myfile"
> >exec(["load(", filename, x, ".dat)"])
> >
> >which will execute
> >
> >load(myfile1.dat)
> 
> I think you were meaning eval instead of exec, and you can't contatenate 

You're right -- I meant to type eval.

> strings and numbers like that-- you need something like num2str.  Also, a 

Look carefully -- x and filename were both strings :)

Cheers
Stefan


reply via email to

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