[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
problem loop array
From: |
LucaLuca |
Subject: |
problem loop array |
Date: |
Sat, 21 Jul 2018 10:43:33 -0500 (CDT) |
hi, see this example:
a={3,5,8};
a{3}(end+1)=80;
a
for cc=1:columns(a)
printf("Columns Number: %d ** Value: %d \n",cc,a{cc});
endfor
Output:
a =
{
[1,1] = 3
[1,2] = 5
[1,3] =
8 80
}
max N. columns 3
Columns Numnber: 1 ** Value: 3
Columns Numnber: 2 ** Value: 5
Columns Numnber: 3 ** Value: 8
Columns Numnber: 80 ** Value: >>
Why in the last columns number is egual 80? ..this isn't counter value(cc)
but this is element of cell array
--
Sent from: http://octave.1599824.n4.nabble.com/Octave-General-f1599825.html
- problem loop array,
LucaLuca <=