[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Octave-bug-tracker] [bug #55622] for loop does not run over a matrix wi
From: |
Muhammad Yasirroni |
Subject: |
[Octave-bug-tracker] [bug #55622] for loop does not run over a matrix with colums but no row |
Date: |
Sun, 29 Nov 2020 18:34:53 -0500 (EST) |
User-agent: |
Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/87.0.4280.67 Safari/537.36 Edg/87.0.664.47 |
Follow-up Comment #18, bug #55622 (project octave):
I don't understand why we debate over an empty matrix. Clearly, the column
vector is not empty at all. So, we should iterate over it.
Furthermore, if we got it as a result of a function, we sometimes didn't check
the dimension of our matrix, such as:
b=[3;1;2];
[sorted_b, indices] = sort(b);
size(indices)
for a=indices
disp('loop')
disp(b(a))
end
ans =
3 1
loop
1
2
3
When we expect that we are able to iterate over indices.
_______________________________________________________
Reply to this item at:
<https://savannah.gnu.org/bugs/?55622>
_______________________________________________
Message sent via Savannah
https://savannah.gnu.org/
- [Octave-bug-tracker] [bug #55622] for loop does not run over a matrix with colums but no row,
Muhammad Yasirroni <=