[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: num2cell
From: |
David Bateman |
Subject: |
Re: num2cell |
Date: |
Tue, 13 Sep 2005 05:58:18 +0200 |
User-agent: |
Mozilla Thunderbird 1.0.2 (Windows/20050317) |
Søren Hauberg a écrit :
After John's mail I've tried num2cell.cc and it works just fine for my
uses, but it has some oddities (is that a word?). I don't have access
to matlab (nor do I want it) so I don't know what the "correct"
behaviour is, but
num2cell("hello")
gives me a 1x5 cell of empty matrices ([]'s), which doesn't seem right.
I'd say thats a bug. I'll fix it..
Also if num2cell is called with a struct as argument, the answer will
be a cell containing an empty matrix.
Didn't implement that case at all. What does matlab do in that case? I
suspect the char case is related to this as the charMatrix case isn't
being called and only the cell array is being constructed and not
filled. This should probably generate an error message, unless I can
figure out a way to do an index on an octave_value. Unfortunately the
octave_value class doesn't have an index function, so thats not that easy..
Cheers
David
I hope I'll be able to find some time this week to have a look at the
code...
Thanks,
Søren
-------------------------------------------------------------
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
-------------------------------------------------------------