From: BrI <oc...@th...> - 2004-05-04 22:58:49
|
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. |