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

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

[Octave-bug-tracker] [bug #49759] Inconsistent concatenation with cat, h


From: Mike Miller
Subject: [Octave-bug-tracker] [bug #49759] Inconsistent concatenation with cat, horzcat, vertcat, and []
Date: Tue, 6 Dec 2016 17:48:43 +0000 (UTC)
User-agent: Mozilla/5.0 (X11; Linux x86_64; rv:50.0) Gecko/20100101 Firefox/50.0

Follow-up Comment #4, bug #49759 (project octave):

I agree, I don't see any open reports about the *cat functions specifically.

The problem looks like it occurs when empty numeric arrays are converted into
cell arrays for concatenation. Any homogeneous set collapses correctly:


>> vertcat ({}, {}, {}, {}, {}, {})
ans = {}(0x0)
>> vertcat ([], [], [], [], [], [])
ans = [](0x0)


But as soon as a mixed set is introduced, it adds empty elements to a
non-empty cell array.


>> vertcat ({}, {}, {}, {}, {}, [])
ans = 
{
  [1,1] = [](0x0)
}


Amro - in Matlab, does the empty array have to be a double or can it be any
empty numeric? What does your original example do with "A = int32([])" or "A =
rand(0, 'single')"?

    _______________________________________________________

Reply to this item at:

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

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




reply via email to

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