From: Etienne G. <et...@cs...> - 2006-01-14 08:07:35
|
Hello, both cell2mat({1, 2, 3}) and cell2mat({1; 2; 3}) fail w/ 2.9.3. =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D octave:12> cell2mat({1; 2; 3}) *** cat: -- Built-in Function: cat (DIM, ARRAY1, ARRAY2, ..., ARRAYN) Return the concatenation of N-d array objects, ARRAY1, ARRAY2, ..., ARRAYN along dimension DIM. [snip] See also: horzcat and vertcat. error: evaluating assignment expression near line 65, column 14 error: evaluating for command near line 64, column 5 error: evaluating for command near line 60, column 3 error: called from `cell2mat'in file `/home/etienne/prog/octave/octave-forge/octave-forge/main/cell/cell2mat.m= ' octave:12> cell2mat({1, 2, 3}) *** cat: -- Built-in Function: cat (DIM, ARRAY1, ARRAY2, ..., ARRAYN) Return the concatenation of N-d array objects, ARRAY1, ARRAY2, ..., ARRAYN along dimension DIM. [snip] error: evaluating assignment expression near line 69, column 5 error: called from `cell2mat'in file `/home/etienne/prog/octave=F8ctave-forge/octave-forge/main/cell/cell2mat.= m' =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D version is 2.9.3, home-compiled. More info needed? Hth, Etienne On Sat, Jan 14, 2006 at 12:57:57AM -0500, Paul Kienzle wrote: # Laurent, #=20 # I applied your fix to octave-forge. #=20 # Someone with a working 2.9.x will have to check if the fix is needed # there as well. Here's the test: #=20 # assert (cell2mat({1, 2, 3}), [1, 2, 3]); # assert (cell2mat({1; 2; 3}), [1; 2; 3]); #=20 # See attached for Laurent's fix as a patch to the current octave CVS. #=20 # * general/cell2mat.m: support 1D cell argument. #=20 # - Paul #=20 # On Jan 13, 2006, at 12:16 PM, Laurent Mazet wrote: #=20 # >On Thu, 8 Dec 2005 21:31:56 +0800 # >William Poetra Yoga Hadisoeseno <wil...@gm...> wrote: # >... # > # >Hi, # > # >Sorry I'm late to comment the post. # > # >First, I found a bug on 1D cell argument (file attached). I will=20 # >update the # >octave-forge version as soon I managed to boot again my own coputer (H= D # >controler broken :-( ) # > # >Seconldy, I read the code you added for dimension and type checking=20 # >but I don't # >think it's efficient for a such function. This type of function has to= =20 # >been run # >as fast as possible and usualy no-ones care of the error message=20 # >(except # >during the debugging process). From my point of view, cell2mat don't=20 # >have to # >waste time on input checking. # > # > Laurent # >--=20 # >Dr. Laurent Mazet: Research Engineer /V\ Centre de Recherche de=20 # >MOTOROLA # >Tel: +33 1 69 35 48 30 =3D-=3D-=3D-=3D-=3D-=3D-=3D-=3D Email:=20 # >lau...@mo... # ><cell2mat.m> #=20 #=20 --=20 Etienne Grossmann ------ http://www.cs.uky.edu/~etienne |