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

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

[Octave-bug-tracker] [bug #48867] delete elements from array with indire


From: Amro
Subject: [Octave-bug-tracker] [bug #48867] delete elements from array with indirect empty matrix
Date: Wed, 24 Aug 2016 21:05:34 +0000 (UTC)
User-agent: Mozilla/5.0 (Windows NT 10.0; WOW64; rv:48.0) Gecko/20100101 Firefox/48.0

Follow-up Comment #3, bug #48867 (project octave):

Funny enough, only double-type empty-matrix is accepted by subsasgn, even when
the array is not double itself!


>> x = 1:10;
>> x = subsasgn(x, substruct('()',{1}), single([]))
In an assignment  A(:) = B, the number of elements in A and B must be the
same.
 
>> x = single(1:10);
>> x = subsasgn(x, substruct('()',{1}), single([]))
In an assignment  A(:) = B, the number of elements in A and B must be the
same.

>> x = subsasgn(x, substruct('()',{1}), double([]))
x =

     2     3     4     5     6     7     8     9    10


same thing with zeros(0,0,'single') as opposed to zeros(0,0).


    _______________________________________________________

Reply to this item at:

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

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




reply via email to

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