From help-octave-request at bevo dot che dot wisc dot edu Mon Jan 14 05:12:34 2002 Subject: Re: supressing eval output From: Douglas Eck To: Juraj Krempasky CC: help-octave at bevo dot che dot wisc dot edu Date: Mon, 14 Jan 2002 12:12:28 +0100 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 > -- > > _____ > / / juraj dot krempasky at psi dot ch > _/_/_/ _/ _/_/_/ /____ 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 -------------------------------------------------------------