octave-bug-tracker
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[Octave-bug-tracker] [bug #35481] [var{:}] does not collapse empty eleme


From: Ben Abbott
Subject: [Octave-bug-tracker] [bug #35481] [var{:}] does not collapse empty elements when some elements are cell
Date: Tue, 14 Feb 2012 02:39:37 +0000
User-agent: Mozilla/5.0 (Macintosh; Intel Mac OS X 10_7_3) AppleWebKit/535.11 (KHTML, like Gecko) Chrome/17.0.963.46 Safari/535.11

Follow-up Comment #6, bug #35481 (project octave):

I'd expect each of the assignments below to give identical results. The
results below are from Matlab.


>> a = [1, {}, [], 'a']

a = 

    [1]    'a'

>> a = [{1} {} {[]} {'a'}]

a = 

    [1]    []    'a'

>> a = {1, [], 'a'}

a = 

    [1]    []    'a'


Look to be a Matlab bug.

My guess is that when concatenating inside the square brackets ML is pruning
the empties ([]) before its parser recognizes it is working will a cell array.
When concatenating the cells ML correctly prunes the empty cells ({}).

    _______________________________________________________

Reply to this item at:

  <http://savannah.gnu.org/bugs/?35481>

_______________________________________________
  Message sent via/by Savannah
  http://savannah.gnu.org/




reply via email to

[Prev in Thread] Current Thread [Next in Thread]