From help-request at octave dot org Sat Jun 18 16:29:21 2005 Subject: Re: MAtlab and Octave same code for both From: SITI HAJAR A BAKAR To: Joan Picanyol i Puig , help@octave.org Date: Sun, 19 Jun 2005 06:52:49 +1000 Thanks for the suggestions! both exist('OCTAVE_VERSION') and exist ('version') worked. I'm using something similar ( I think) to what you;ve done below but clumsier. JUst by adding a t the beginning if(exist('OCTAVE_VERSION')) octa=1; end; > I've been using this to aid in debugging: > > if(exist('OCTAVE_VERSION')) > old_silent_functions = silent_functions; > silent_functions = 1; > end > > [...] > > if(exist('OCTAVE_VERSION')) > silent_functions = old_silent_functions; > end > > together with ending my interesting lines with a ',' and do some > sedding before > testing in Matlab (which doesn't know about silent_functions). > > qvb > -- > pica > > > > ------------------------------------------------------------- > 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 > ------------------------------------------------------------- > > ------------------------------------------------------------- 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 -------------------------------------------------------------