Mercurial > octave-nkf
comparison src/ov-cell.cc @ 4705:a1b165f5e934
[project @ 2004-01-22 04:26:19 by jwe]
author | jwe |
---|---|
date | Thu, 22 Jan 2004 04:26:19 +0000 |
parents | 5e2c68946f30 |
children | 8f892ca5851d |
comparison
equal
deleted
inserted
replaced
4704:e1b71baef20c | 4705:a1b165f5e934 |
---|---|
79 | 79 |
80 if (tcell.length () == 1) | 80 if (tcell.length () == 1) |
81 retval = tcell(0,0); | 81 retval = tcell(0,0); |
82 else | 82 else |
83 { | 83 { |
84 int nr = tcell.rows (); | 84 int n = tcell.numel (); |
85 int nc = tcell.columns (); | 85 |
86 octave_value_list lst (nr * nc, octave_value ()); | 86 octave_value_list lst (n, octave_value ()); |
87 int k = 0; | 87 |
88 for (int j = 0; j < nc; j++) | 88 for (int i = 0; i < n; i++) |
89 for (int i = 0; i < nr; i++) | 89 { |
90 { | 90 OCTAVE_QUIT; |
91 OCTAVE_QUIT; | 91 lst(i) = tcell(i); |
92 lst(k++) = tcell(i,j); | 92 } |
93 } | 93 |
94 retval = octave_value (lst, true); | 94 retval = octave_value (lst, true); |
95 } | 95 } |
96 } | 96 } |
97 } | 97 } |
98 break; | 98 break; |