help-octave
[Top][All Lists]
Advanced

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

Re: supressing eval output


From: Douglas Eck
Subject: Re: supressing eval output
Date: Mon, 14 Jan 2002 12:12:28 +0100
User-agent: Mozilla/5.0 (X11; U; Linux i686; en-US; rv:0.9.7) Gecko/20011221

Juraj Krempasky wrote:

Hi there,

I'm loading various matrices with

for i=1 : 100
 load (eval(sprintf("\"/mat_%d\"",i)));
 mstr=eval(sprintf("\"mat_%d\"",i));
 m=eval(mstr);
...

so as to keep the m behavior dynamic, I do it through eval(mstr) (peharps there is a better solution). But then the assignment m=eval(mstr) outputs the content of the m even if I have the ";". Any Idea how to supress the eval() output?

thanks



You need to put a ";" in mstr as well:

 cmd="a=rand(4,5)";
 eval(cmd);

will display the matrix a

 cmd="a=rand(4,5);";
 eval(cmd);

will not...

Cheers,
Doug





--

                         _____
                        /    /        address@hidden
     _/_/_/  _/   _/_/_/    /____    Computing & Controls
_/ _/ _/ / Paul Scherrer Institute _/_/ _/ _/_/ ____/ CH-5232 Villigen-PSI
        _/_/         _/   /      Tel: ++41 56 310 5131
 _/_/_/_/_/_/_/__/_/_/___/      Fax: ++41 56 310 3151




--
Dr. Douglas Eck, http://www.idsia.ch/~doug
Istituto Dalle Molle di Studi sull'Intelligenza Artificiale (IDSIA)
Neural Networks, Rhythm Perception and Production, Dynamical Systems



-------------------------------------------------------------
Octave is freely available under the terms of the GNU GPL.

Octave's home on the web:  http://www.octave.org
How to fund new projects:  http://www.octave.org/funding.html
Subscription information:  http://www.octave.org/archive.html
-------------------------------------------------------------



reply via email to

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