From help-request at octave dot org Wed Dec 21 03:19:48 2005 Subject: Re: function names From: David Bateman To: michaelschmid1 at bluewin dot ch Cc: help at octave dot org Date: Wed, 21 Dec 2005 10:15:19 +0100 michaelschmid1 at bluewin dot ch wrote: >I tried yesterday evening to define a function >called "minmax" > >function pr = minmax(p) > >pr = p; > >endfunction > >but Octave doesn't accept this name. > >function pr = min_max(p) was ok. > >Why that? This should be a new function, not interpreting the min function... > >Octave Version 2.9.3 on cygwin > >Thanks for any answers >Michael > > > Ok, this is a little octave stupidity and one that John has recently mentioned he wants to remove. The min and max functions are all in a single oct-file called minmax.oct and the min, max functions are both symbolic links to this one file. It would have been better that minmax.oct was called max.oct and min.oct was a symbolic link to max.oct. The problem is as you've found if you name a function minmax octave find the file minmax.oct and then can't use your function... The workaround is as you said, don't use the function name minmax.... D. -- David Bateman David dot Bateman at motorola dot com Motorola Labs - Paris +33 1 69 35 48 04 (Ph) Parc Les Algorithmes, Commune de St Aubin +33 1 69 35 77 01 (Fax) 91193 Gif-Sur-Yvette FRANCE The information contained in this communication has been classified as: [x] General Business Information [ ] Motorola Internal Use Only [ ] Motorola Confidential Proprietary ------------------------------------------------------------- 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 -------------------------------------------------------------