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

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

[Octave-bug-tracker] [bug #62405] Out of Bound(OOB) on subsindex()


From: Markus Mützel
Subject: [Octave-bug-tracker] [bug #62405] Out of Bound(OOB) on subsindex()
Date: Tue, 3 May 2022 08:12:21 -0400 (EDT)

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

It's still not clear to me which output you expect.
I'm guessing, you'd like to see something like:

>> input_container = InputContainer([1 2 3 4]);
>> b = 1:2;
>> input_container(b)
  ans =
    1:2


That *is* an indexing operation into the object. You'd need to overload
`subsref` (not `subsindex`) to handle that.

The overloaded function could probably look something like:

function val = subsref (this, idx)
  val = subsref (this.mat, idx);
endfunction


Is that what you are looking for?



    _______________________________________________________

Reply to this item at:

  <https://savannah.gnu.org/bugs/?62405>

_______________________________________________
  Message sent via Savannah
  https://savannah.gnu.org/




reply via email to

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