Mercurial > octave-nkf
comparison test/test_slice.m @ 7016:93c65f2a5668
[project @ 2007-10-12 06:40:56 by jwe]
author | jwe |
---|---|
date | Fri, 12 Oct 2007 06:41:26 +0000 |
parents | f806e2740216 |
children | 7cbe01c21986 |
comparison
equal
deleted
inserted
replaced
7015:0a708692d51d | 7016:93c65f2a5668 |
---|---|
1 ## Copyright (C) 2007 John W. Eaton | |
2 ## | |
3 ## This file is part of Octave. | |
4 ## | |
5 ## Octave is free software; you can redistribute it and/or modify it | |
6 ## under the terms of the GNU General Public License as published by | |
7 ## the Free Software Foundation; either version 3 of the License, or (at | |
8 ## your option) any later version. | |
9 ## | |
10 ## Octave is distributed in the hope that it will be useful, but | |
11 ## WITHOUT ANY WARRANTY; without even the implied warranty of | |
12 ## MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU | |
13 ## General Public License for more details. | |
14 ## | |
15 ## You should have received a copy of the GNU General Public License | |
16 ## along with Octave; see the file COPYING. If not, see | |
17 ## <http://www.gnu.org/licenses/>. | |
18 | |
1 %!function x = set_slice(size, dim, slice) | 19 %!function x = set_slice(size, dim, slice) |
2 %! x = ones(size); | 20 %! x = ones(size); |
3 %! switch dim | 21 %! switch dim |
4 %! case 11 | 22 %! case 11 |
5 %! x(slice) = 2; | 23 %! x(slice) = 2; |