[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Octave-bug-tracker] [bug #63160] Iterating over objects in a for-loop
From: |
Arun Giridhar |
Subject: |
[Octave-bug-tracker] [bug #63160] Iterating over objects in a for-loop |
Date: |
Wed, 5 Oct 2022 11:44:05 -0400 (EDT) |
Follow-up Comment #3, bug #63160 (project octave):
I can do that in Octave as long as it's a row vector:
>> A
A =
scalar structure containing the fields:
foo = 1
bar = 2
>> B
B =
scalar structure containing the fields:
foo = 3
bar = 4
>> for i = [A, B], i, end
i =
scalar structure containing the fields:
foo = 1
bar = 2
i =
scalar structure containing the fields:
foo = 3
bar = 4
Does it help to force-convert to a row vector like this?
for i = objects(:).' # convert to row vector
i
end
_______________________________________________________
Reply to this item at:
<https://savannah.gnu.org/bugs/?63160>
_______________________________________________
Message sent via Savannah
https://savannah.gnu.org/