From: David B. <Dav...@mo...> - 2004-05-05 08:43:55
|
The problem was reported already in the thread. http://www.octave.org/mailing-lists/bug-octave/2004/294 http://www.octave.org/mailing-lists/bug-octave/2004/295 http://www.octave.org/mailing-lists/bug-octave/2004/298 http://www.octave.org/mailing-lists/bug-octave/2004/302 http://www.octave.org/mailing-lists/bug-octave/2004/307 http://www.octave.org/mailing-lists/bug-octave/2004/308 The conclusion, is that the problem is known, but that there is no easy solution... Of course you're welcome to send a patch :-) Sorry I don't know an easy workaround, though there are lots of potential ugly workarounds to check upto a certain number of possible output args.. Cheers David According to BrI <oc...@th...> (on 05/05/04): > > Hi, > > I'm encountering a problem in Octave, and I'm wonder whether it's a bug, or > rather just an interpretation of how some code should work. > > I have a function: > > function [a,b,c] = func1 > a = 100; > b = 'fred'; > c = 300; > > ------------- > > In Matlab: > > [t{1:3}]=func1 > t = [100] 'fred' [300] > > In Octave: > > [t{1:3}]=func1 > t = > { > [1,1] [100] > [1,2] [100] > [1,3] [100] > } > > > So MatLab intreprets the range to mean that it should return more parameters > into the cell, whereas Octave treats it to mean that the first parameter > should be returned into t 3 times. > > The reason I'm using this is because I'm using the function eval and I don't > know how many parameters the function being evaluated will be returning, so > I want to check them. Does any body know of a good workaround in Octave? > > cheers. > > > > ------------------------------------------------------- > This SF.Net email is sponsored by: Oracle 10g > Get certified on the hottest thing ever to hit the market... Oracle 10g. > Take an Oracle 10g class now, and we'll give you the exam FREE. > http://ads.osdn.com/?ad_id=3149&alloc_id=8166&op=click > _______________________________________________ > Octave-dev mailing list > Oct...@li... > https://lists.sourceforge.net/lists/listinfo/octave-dev -- David Bateman Dav...@mo... Motorola CRM +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 |