Mercurial > octave-nkf
annotate test/index.tst @ 18479:85d31344fb23 stable rc-3-8-1-2
3.8.1 release candidate 2
* configure.ac (OCTAVE_VERSION): Bump to 3.8.1-rc2.
(OCTAVE_MINOR_VERSION): Bump to 1-rc2.
(OCTAVE_RELEASE_DATE): Set to 2014-02-14.
author | John W. Eaton <jwe@octave.org> |
---|---|
date | Mon, 17 Feb 2014 02:20:39 -0500 |
parents | d63878346099 |
children | 4197fc428c7d |
rev | line source |
---|---|
17744
d63878346099
maint: Update copyright notices for release.
John W. Eaton <jwe@octave.org>
parents:
17642
diff
changeset
|
1 ## Copyright (C) 2006-2013 John W. Eaton |
7016 | 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 | |
5590 | 19 %!test |
20 %! a = []; | |
14131
c3309e1ec50d
test: Use Octave coding and spacing conventions for fixed test scripts
Rik <octave@nomad.inbox5.com>
parents:
14127
diff
changeset
|
21 %! assert (isempty (a)); |
5590 | 22 |
14131
c3309e1ec50d
test: Use Octave coding and spacing conventions for fixed test scripts
Rik <octave@nomad.inbox5.com>
parents:
14127
diff
changeset
|
23 %!shared a |
5590 | 24 %! a = 1; |
14131
c3309e1ec50d
test: Use Octave coding and spacing conventions for fixed test scripts
Rik <octave@nomad.inbox5.com>
parents:
14127
diff
changeset
|
25 %!assert (a(1), 1) |
c3309e1ec50d
test: Use Octave coding and spacing conventions for fixed test scripts
Rik <octave@nomad.inbox5.com>
parents:
14127
diff
changeset
|
26 %!assert (a(:), 1) |
c3309e1ec50d
test: Use Octave coding and spacing conventions for fixed test scripts
Rik <octave@nomad.inbox5.com>
parents:
14127
diff
changeset
|
27 %!assert (a(:,:), 1) |
c3309e1ec50d
test: Use Octave coding and spacing conventions for fixed test scripts
Rik <octave@nomad.inbox5.com>
parents:
14127
diff
changeset
|
28 %!assert (a(1,:), 1) |
16213
b1283d4c06c2
test: Use Octave coding standards for scripts in test/ directory.
Rik <rik@octave.org>
parents:
16073
diff
changeset
|
29 %!assert (a(:,1), 1) |
14131
c3309e1ec50d
test: Use Octave coding and spacing conventions for fixed test scripts
Rik <octave@nomad.inbox5.com>
parents:
14127
diff
changeset
|
30 %!assert (isempty (a(logical (0)))) |
c3309e1ec50d
test: Use Octave coding and spacing conventions for fixed test scripts
Rik <octave@nomad.inbox5.com>
parents:
14127
diff
changeset
|
31 %!error a(-1) |
c3309e1ec50d
test: Use Octave coding and spacing conventions for fixed test scripts
Rik <octave@nomad.inbox5.com>
parents:
14127
diff
changeset
|
32 %!error a(2) |
c3309e1ec50d
test: Use Octave coding and spacing conventions for fixed test scripts
Rik <octave@nomad.inbox5.com>
parents:
14127
diff
changeset
|
33 %!error a(2,:) |
c3309e1ec50d
test: Use Octave coding and spacing conventions for fixed test scripts
Rik <octave@nomad.inbox5.com>
parents:
14127
diff
changeset
|
34 %!error a(:,2) |
c3309e1ec50d
test: Use Octave coding and spacing conventions for fixed test scripts
Rik <octave@nomad.inbox5.com>
parents:
14127
diff
changeset
|
35 %!error a(-1,:) |
c3309e1ec50d
test: Use Octave coding and spacing conventions for fixed test scripts
Rik <octave@nomad.inbox5.com>
parents:
14127
diff
changeset
|
36 %!error a(:,-1) |
c3309e1ec50d
test: Use Octave coding and spacing conventions for fixed test scripts
Rik <octave@nomad.inbox5.com>
parents:
14127
diff
changeset
|
37 %!error a([1,2,3]) |
c3309e1ec50d
test: Use Octave coding and spacing conventions for fixed test scripts
Rik <octave@nomad.inbox5.com>
parents:
14127
diff
changeset
|
38 %!error a([1;2;3]) |
c3309e1ec50d
test: Use Octave coding and spacing conventions for fixed test scripts
Rik <octave@nomad.inbox5.com>
parents:
14127
diff
changeset
|
39 %!error a([1,2;3,4]) |
c3309e1ec50d
test: Use Octave coding and spacing conventions for fixed test scripts
Rik <octave@nomad.inbox5.com>
parents:
14127
diff
changeset
|
40 %!error a([0,1]) |
c3309e1ec50d
test: Use Octave coding and spacing conventions for fixed test scripts
Rik <octave@nomad.inbox5.com>
parents:
14127
diff
changeset
|
41 %!error a([0;1]) |
c3309e1ec50d
test: Use Octave coding and spacing conventions for fixed test scripts
Rik <octave@nomad.inbox5.com>
parents:
14127
diff
changeset
|
42 %!error a([-1,0]) |
c3309e1ec50d
test: Use Octave coding and spacing conventions for fixed test scripts
Rik <octave@nomad.inbox5.com>
parents:
14127
diff
changeset
|
43 %!error a([-1;0]) |
5590 | 44 |
14131
c3309e1ec50d
test: Use Octave coding and spacing conventions for fixed test scripts
Rik <octave@nomad.inbox5.com>
parents:
14127
diff
changeset
|
45 %!shared a, a_prime, mid_a |
5590 | 46 %! a = [4,3,2,1]; |
47 %! a_prime = [4;3;2;1]; | |
48 %! mid_a = [3,2]; | |
49 | |
14131
c3309e1ec50d
test: Use Octave coding and spacing conventions for fixed test scripts
Rik <octave@nomad.inbox5.com>
parents:
14127
diff
changeset
|
50 %!assert (a(1),4) |
c3309e1ec50d
test: Use Octave coding and spacing conventions for fixed test scripts
Rik <octave@nomad.inbox5.com>
parents:
14127
diff
changeset
|
51 %!assert (a(2),3) |
c3309e1ec50d
test: Use Octave coding and spacing conventions for fixed test scripts
Rik <octave@nomad.inbox5.com>
parents:
14127
diff
changeset
|
52 %!assert (all (a(:) == a_prime)) |
c3309e1ec50d
test: Use Octave coding and spacing conventions for fixed test scripts
Rik <octave@nomad.inbox5.com>
parents:
14127
diff
changeset
|
53 %!assert (all (a(1,:) == a)) |
c3309e1ec50d
test: Use Octave coding and spacing conventions for fixed test scripts
Rik <octave@nomad.inbox5.com>
parents:
14127
diff
changeset
|
54 %!assert (a(:,3),2) |
c3309e1ec50d
test: Use Octave coding and spacing conventions for fixed test scripts
Rik <octave@nomad.inbox5.com>
parents:
14127
diff
changeset
|
55 %!assert (all (a(:,:) == a)) |
c3309e1ec50d
test: Use Octave coding and spacing conventions for fixed test scripts
Rik <octave@nomad.inbox5.com>
parents:
14127
diff
changeset
|
56 %!assert (all (a(logical ([0,1,1,0])) == mid_a)) |
c3309e1ec50d
test: Use Octave coding and spacing conventions for fixed test scripts
Rik <octave@nomad.inbox5.com>
parents:
14127
diff
changeset
|
57 %!error a(0) |
c3309e1ec50d
test: Use Octave coding and spacing conventions for fixed test scripts
Rik <octave@nomad.inbox5.com>
parents:
14127
diff
changeset
|
58 %!error a(5) |
c3309e1ec50d
test: Use Octave coding and spacing conventions for fixed test scripts
Rik <octave@nomad.inbox5.com>
parents:
14127
diff
changeset
|
59 %!error a(0,1) |
c3309e1ec50d
test: Use Octave coding and spacing conventions for fixed test scripts
Rik <octave@nomad.inbox5.com>
parents:
14127
diff
changeset
|
60 %!assert (isempty (a(logical (0),:))) |
c3309e1ec50d
test: Use Octave coding and spacing conventions for fixed test scripts
Rik <octave@nomad.inbox5.com>
parents:
14127
diff
changeset
|
61 %!error a(:,0) |
c3309e1ec50d
test: Use Octave coding and spacing conventions for fixed test scripts
Rik <octave@nomad.inbox5.com>
parents:
14127
diff
changeset
|
62 %!assert (isempty (a([]))) |
c3309e1ec50d
test: Use Octave coding and spacing conventions for fixed test scripts
Rik <octave@nomad.inbox5.com>
parents:
14127
diff
changeset
|
63 %!assert (isempty (a([],:))) |
c3309e1ec50d
test: Use Octave coding and spacing conventions for fixed test scripts
Rik <octave@nomad.inbox5.com>
parents:
14127
diff
changeset
|
64 %!assert (isempty (a(:,[]))) |
5590 | 65 |
14131
c3309e1ec50d
test: Use Octave coding and spacing conventions for fixed test scripts
Rik <octave@nomad.inbox5.com>
parents:
14127
diff
changeset
|
66 %!shared a, a_fvec, a_col_1, a_col_2, a_row_1, a_row_2 |
5590 | 67 %! a = [1,2;3,4]; |
68 %! a_fvec = [1;3;2;4]; | |
69 %! a_col_1 = [1;3]; | |
70 %! a_col_2 = [2;4]; | |
71 %! a_row_1 = [1,2]; | |
72 %! a_row_2 = [3,4]; | |
73 | |
14131
c3309e1ec50d
test: Use Octave coding and spacing conventions for fixed test scripts
Rik <octave@nomad.inbox5.com>
parents:
14127
diff
changeset
|
74 %!assert (all (all (a(:,:) == a))) |
c3309e1ec50d
test: Use Octave coding and spacing conventions for fixed test scripts
Rik <octave@nomad.inbox5.com>
parents:
14127
diff
changeset
|
75 %!assert (all (a(:) == a_fvec)) |
c3309e1ec50d
test: Use Octave coding and spacing conventions for fixed test scripts
Rik <octave@nomad.inbox5.com>
parents:
14127
diff
changeset
|
76 %!error a(0) |
c3309e1ec50d
test: Use Octave coding and spacing conventions for fixed test scripts
Rik <octave@nomad.inbox5.com>
parents:
14127
diff
changeset
|
77 %!assert (a(2), 3) |
5590 | 78 |
7646
ad16ea379d2f
additional fixes for Array::assignN
David Bateman <dbateman@free.fr>
parents:
7642
diff
changeset
|
79 %% Additional tests |
14131
c3309e1ec50d
test: Use Octave coding and spacing conventions for fixed test scripts
Rik <octave@nomad.inbox5.com>
parents:
14127
diff
changeset
|
80 |
7646
ad16ea379d2f
additional fixes for Array::assignN
David Bateman <dbateman@free.fr>
parents:
7642
diff
changeset
|
81 %!shared a, b |
5590 | 82 %! a = [1,2;3,4]; |
83 %! b = a; | |
84 %! b(:,:,2) = [5,6;7,8]; | |
7646
ad16ea379d2f
additional fixes for Array::assignN
David Bateman <dbateman@free.fr>
parents:
7642
diff
changeset
|
85 |
14131
c3309e1ec50d
test: Use Octave coding and spacing conventions for fixed test scripts
Rik <octave@nomad.inbox5.com>
parents:
14127
diff
changeset
|
86 %!assert (a(:), [1;3;2;4]) |
c3309e1ec50d
test: Use Octave coding and spacing conventions for fixed test scripts
Rik <octave@nomad.inbox5.com>
parents:
14127
diff
changeset
|
87 %!assert (a(1:2), [1,3]) |
c3309e1ec50d
test: Use Octave coding and spacing conventions for fixed test scripts
Rik <octave@nomad.inbox5.com>
parents:
14127
diff
changeset
|
88 %!assert (a(:,:), [1,2;3,4]) |
c3309e1ec50d
test: Use Octave coding and spacing conventions for fixed test scripts
Rik <octave@nomad.inbox5.com>
parents:
14127
diff
changeset
|
89 %!assert (a(:,1), [1;3]) |
c3309e1ec50d
test: Use Octave coding and spacing conventions for fixed test scripts
Rik <octave@nomad.inbox5.com>
parents:
14127
diff
changeset
|
90 %!assert (a(1,1), 1) |
c3309e1ec50d
test: Use Octave coding and spacing conventions for fixed test scripts
Rik <octave@nomad.inbox5.com>
parents:
14127
diff
changeset
|
91 %!assert (a(1:2,1), [1;3]) |
c3309e1ec50d
test: Use Octave coding and spacing conventions for fixed test scripts
Rik <octave@nomad.inbox5.com>
parents:
14127
diff
changeset
|
92 %!assert (a(:,:,1), [1,2;3,4]) |
7646
ad16ea379d2f
additional fixes for Array::assignN
David Bateman <dbateman@free.fr>
parents:
7642
diff
changeset
|
93 |
ad16ea379d2f
additional fixes for Array::assignN
David Bateman <dbateman@free.fr>
parents:
7642
diff
changeset
|
94 %!test |
ad16ea379d2f
additional fixes for Array::assignN
David Bateman <dbateman@free.fr>
parents:
7642
diff
changeset
|
95 %! c(:,:,1) = [1,2;3,4]; |
ad16ea379d2f
additional fixes for Array::assignN
David Bateman <dbateman@free.fr>
parents:
7642
diff
changeset
|
96 %! c(:,:,2) = [1,2;3,4]; |
14131
c3309e1ec50d
test: Use Octave coding and spacing conventions for fixed test scripts
Rik <octave@nomad.inbox5.com>
parents:
14127
diff
changeset
|
97 %! assert (a(:,:,[1,1]), c) |
7646
ad16ea379d2f
additional fixes for Array::assignN
David Bateman <dbateman@free.fr>
parents:
7642
diff
changeset
|
98 |
ad16ea379d2f
additional fixes for Array::assignN
David Bateman <dbateman@free.fr>
parents:
7642
diff
changeset
|
99 %!test |
ad16ea379d2f
additional fixes for Array::assignN
David Bateman <dbateman@free.fr>
parents:
7642
diff
changeset
|
100 %! c(:,:,1,1) = [1,2;3,4]; |
ad16ea379d2f
additional fixes for Array::assignN
David Bateman <dbateman@free.fr>
parents:
7642
diff
changeset
|
101 %! c(:,:,1,2) = [1,2;3,4]; |
14131
c3309e1ec50d
test: Use Octave coding and spacing conventions for fixed test scripts
Rik <octave@nomad.inbox5.com>
parents:
14127
diff
changeset
|
102 %! assert (a(:,:,1,[1,1]), c) |
7646
ad16ea379d2f
additional fixes for Array::assignN
David Bateman <dbateman@free.fr>
parents:
7642
diff
changeset
|
103 |
ad16ea379d2f
additional fixes for Array::assignN
David Bateman <dbateman@free.fr>
parents:
7642
diff
changeset
|
104 %!test |
ad16ea379d2f
additional fixes for Array::assignN
David Bateman <dbateman@free.fr>
parents:
7642
diff
changeset
|
105 %! c(:,:,1,1) = [1,2;3,4]; |
ad16ea379d2f
additional fixes for Array::assignN
David Bateman <dbateman@free.fr>
parents:
7642
diff
changeset
|
106 %! c(:,:,2,1) = [1,2;3,4]; |
ad16ea379d2f
additional fixes for Array::assignN
David Bateman <dbateman@free.fr>
parents:
7642
diff
changeset
|
107 %! c(:,:,1,2) = [1,2;3,4]; |
ad16ea379d2f
additional fixes for Array::assignN
David Bateman <dbateman@free.fr>
parents:
7642
diff
changeset
|
108 %! c(:,:,2,2) = [1,2;3,4]; |
14131
c3309e1ec50d
test: Use Octave coding and spacing conventions for fixed test scripts
Rik <octave@nomad.inbox5.com>
parents:
14127
diff
changeset
|
109 %! assert (a(:,:,[1,1],[1,1]), c) |
7646
ad16ea379d2f
additional fixes for Array::assignN
David Bateman <dbateman@free.fr>
parents:
7642
diff
changeset
|
110 |
14131
c3309e1ec50d
test: Use Octave coding and spacing conventions for fixed test scripts
Rik <octave@nomad.inbox5.com>
parents:
14127
diff
changeset
|
111 %!assert (a(1,[]), zeros (1,0)) |
c3309e1ec50d
test: Use Octave coding and spacing conventions for fixed test scripts
Rik <octave@nomad.inbox5.com>
parents:
14127
diff
changeset
|
112 %!assert (a(1,[],[1,1]), zeros (1,0,2)) |
c3309e1ec50d
test: Use Octave coding and spacing conventions for fixed test scripts
Rik <octave@nomad.inbox5.com>
parents:
14127
diff
changeset
|
113 %!assert (a(1,1,[]), zeros (1,1,0)) |
7646
ad16ea379d2f
additional fixes for Array::assignN
David Bateman <dbateman@free.fr>
parents:
7642
diff
changeset
|
114 |
ad16ea379d2f
additional fixes for Array::assignN
David Bateman <dbateman@free.fr>
parents:
7642
diff
changeset
|
115 %!test |
ad16ea379d2f
additional fixes for Array::assignN
David Bateman <dbateman@free.fr>
parents:
7642
diff
changeset
|
116 %! c (1:10,1) = 1:10; |
ad16ea379d2f
additional fixes for Array::assignN
David Bateman <dbateman@free.fr>
parents:
7642
diff
changeset
|
117 %! assert (c, [1:10]'); |
ad16ea379d2f
additional fixes for Array::assignN
David Bateman <dbateman@free.fr>
parents:
7642
diff
changeset
|
118 |
14131
c3309e1ec50d
test: Use Octave coding and spacing conventions for fixed test scripts
Rik <octave@nomad.inbox5.com>
parents:
14127
diff
changeset
|
119 %!assert (b(:), [1; 3; 2; 4; 5; 7; 6; 8]) |
c3309e1ec50d
test: Use Octave coding and spacing conventions for fixed test scripts
Rik <octave@nomad.inbox5.com>
parents:
14127
diff
changeset
|
120 %!assert (b(:,:), [1, 2, 5, 6; 3, 4, 7, 8]) |
c3309e1ec50d
test: Use Octave coding and spacing conventions for fixed test scripts
Rik <octave@nomad.inbox5.com>
parents:
14127
diff
changeset
|
121 %!assert (b(:,1), [1;3]) |
16213
b1283d4c06c2
test: Use Octave coding standards for scripts in test/ directory.
Rik <rik@octave.org>
parents:
16073
diff
changeset
|
122 %!assert (b(:,:,:), reshape ([1,3,2,4,5,7,6,8], [2,2,2])) |
14131
c3309e1ec50d
test: Use Octave coding and spacing conventions for fixed test scripts
Rik <octave@nomad.inbox5.com>
parents:
14127
diff
changeset
|
123 %!assert (b(:,1,1), [1;3]) |
16213
b1283d4c06c2
test: Use Octave coding standards for scripts in test/ directory.
Rik <rik@octave.org>
parents:
16073
diff
changeset
|
124 %!assert (b(:,1,1,[1,1]),reshape ([1,3,1,3], [2,1,1,2])) |
14131
c3309e1ec50d
test: Use Octave coding and spacing conventions for fixed test scripts
Rik <octave@nomad.inbox5.com>
parents:
14127
diff
changeset
|
125 %!assert (b(1,3), 5) |
c3309e1ec50d
test: Use Octave coding and spacing conventions for fixed test scripts
Rik <octave@nomad.inbox5.com>
parents:
14127
diff
changeset
|
126 %!assert (b(1,[3,4]), [5,6]) |
c3309e1ec50d
test: Use Octave coding and spacing conventions for fixed test scripts
Rik <octave@nomad.inbox5.com>
parents:
14127
diff
changeset
|
127 %!assert (b(1,1:4), [1,2,5,6]) |
c3309e1ec50d
test: Use Octave coding and spacing conventions for fixed test scripts
Rik <octave@nomad.inbox5.com>
parents:
14127
diff
changeset
|
128 %!assert (b(1,[],:), zeros (1,0,2)) |
16213
b1283d4c06c2
test: Use Octave coding standards for scripts in test/ directory.
Rik <rik@octave.org>
parents:
16073
diff
changeset
|
129 %!assert (b(1,[]), zeros (1,0)) |
7646
ad16ea379d2f
additional fixes for Array::assignN
David Bateman <dbateman@free.fr>
parents:
7642
diff
changeset
|
130 %!assert (b(:,3), [5;7]) |
ad16ea379d2f
additional fixes for Array::assignN
David Bateman <dbateman@free.fr>
parents:
7642
diff
changeset
|
131 %!assert (b([1,2],3), [5;7]) |
16213
b1283d4c06c2
test: Use Octave coding standards for scripts in test/ directory.
Rik <rik@octave.org>
parents:
16073
diff
changeset
|
132 %!assert (b(true (2,1), 3), [5;7]) |
b1283d4c06c2
test: Use Octave coding standards for scripts in test/ directory.
Rik <rik@octave.org>
parents:
16073
diff
changeset
|
133 %!assert (b(false (2,1), 3), zeros (0,1)) |
b1283d4c06c2
test: Use Octave coding standards for scripts in test/ directory.
Rik <rik@octave.org>
parents:
16073
diff
changeset
|
134 %!assert (b([],3), zeros (0,1)) |
7646
ad16ea379d2f
additional fixes for Array::assignN
David Bateman <dbateman@free.fr>
parents:
7642
diff
changeset
|
135 |
ad16ea379d2f
additional fixes for Array::assignN
David Bateman <dbateman@free.fr>
parents:
7642
diff
changeset
|
136 %!shared x |
17336
b81b9d079515
Use '##' for comments which stand alone on a line.
Rik <rik@octave.org>
parents:
16215
diff
changeset
|
137 %! ## Dummy shared block to clear any previous definitions |
7646
ad16ea379d2f
additional fixes for Array::assignN
David Bateman <dbateman@free.fr>
parents:
7642
diff
changeset
|
138 %! x = 1; |
ad16ea379d2f
additional fixes for Array::assignN
David Bateman <dbateman@free.fr>
parents:
7642
diff
changeset
|
139 |
ad16ea379d2f
additional fixes for Array::assignN
David Bateman <dbateman@free.fr>
parents:
7642
diff
changeset
|
140 %!test |
ad16ea379d2f
additional fixes for Array::assignN
David Bateman <dbateman@free.fr>
parents:
7642
diff
changeset
|
141 %! a(1,:) = [1,3]; |
ad16ea379d2f
additional fixes for Array::assignN
David Bateman <dbateman@free.fr>
parents:
7642
diff
changeset
|
142 %! assert (a, [1,3]); |
ad16ea379d2f
additional fixes for Array::assignN
David Bateman <dbateman@free.fr>
parents:
7642
diff
changeset
|
143 |
ad16ea379d2f
additional fixes for Array::assignN
David Bateman <dbateman@free.fr>
parents:
7642
diff
changeset
|
144 %!test |
ad16ea379d2f
additional fixes for Array::assignN
David Bateman <dbateman@free.fr>
parents:
7642
diff
changeset
|
145 %! a(1,:) = [1;3]; |
ad16ea379d2f
additional fixes for Array::assignN
David Bateman <dbateman@free.fr>
parents:
7642
diff
changeset
|
146 %! assert (a, [1,3]); |
ad16ea379d2f
additional fixes for Array::assignN
David Bateman <dbateman@free.fr>
parents:
7642
diff
changeset
|
147 |
ad16ea379d2f
additional fixes for Array::assignN
David Bateman <dbateman@free.fr>
parents:
7642
diff
changeset
|
148 %!test |
ad16ea379d2f
additional fixes for Array::assignN
David Bateman <dbateman@free.fr>
parents:
7642
diff
changeset
|
149 %! a(:,1) = [1;3]; |
ad16ea379d2f
additional fixes for Array::assignN
David Bateman <dbateman@free.fr>
parents:
7642
diff
changeset
|
150 %! assert (a, [1;3]); |
ad16ea379d2f
additional fixes for Array::assignN
David Bateman <dbateman@free.fr>
parents:
7642
diff
changeset
|
151 |
ad16ea379d2f
additional fixes for Array::assignN
David Bateman <dbateman@free.fr>
parents:
7642
diff
changeset
|
152 %!test |
ad16ea379d2f
additional fixes for Array::assignN
David Bateman <dbateman@free.fr>
parents:
7642
diff
changeset
|
153 %! a = [1,2;3,4]; |
ad16ea379d2f
additional fixes for Array::assignN
David Bateman <dbateman@free.fr>
parents:
7642
diff
changeset
|
154 %! b (1,:,:) = a; |
ad16ea379d2f
additional fixes for Array::assignN
David Bateman <dbateman@free.fr>
parents:
7642
diff
changeset
|
155 %! assert (b, reshape (a, [1,2,2])); |
ad16ea379d2f
additional fixes for Array::assignN
David Bateman <dbateman@free.fr>
parents:
7642
diff
changeset
|
156 |
ad16ea379d2f
additional fixes for Array::assignN
David Bateman <dbateman@free.fr>
parents:
7642
diff
changeset
|
157 %!test |
ad16ea379d2f
additional fixes for Array::assignN
David Bateman <dbateman@free.fr>
parents:
7642
diff
changeset
|
158 %! a(1,1:4,2) = reshape (1:4, [1,1,4]); |
ad16ea379d2f
additional fixes for Array::assignN
David Bateman <dbateman@free.fr>
parents:
7642
diff
changeset
|
159 %! b(:,:,2) = 1:4; |
ad16ea379d2f
additional fixes for Array::assignN
David Bateman <dbateman@free.fr>
parents:
7642
diff
changeset
|
160 %! assert (a, b); |
ad16ea379d2f
additional fixes for Array::assignN
David Bateman <dbateman@free.fr>
parents:
7642
diff
changeset
|
161 |
ad16ea379d2f
additional fixes for Array::assignN
David Bateman <dbateman@free.fr>
parents:
7642
diff
changeset
|
162 %!test |
16215
6fe6ac8bbfdb
test: Remove trailing spaces from ends of lines in test/ directory.
Rik <rik@octave.org>
parents:
16213
diff
changeset
|
163 %! a(:,:,:) = 1:4; |
7646
ad16ea379d2f
additional fixes for Array::assignN
David Bateman <dbateman@free.fr>
parents:
7642
diff
changeset
|
164 %! assert (a, [1:4]); |
ad16ea379d2f
additional fixes for Array::assignN
David Bateman <dbateman@free.fr>
parents:
7642
diff
changeset
|
165 |
ad16ea379d2f
additional fixes for Array::assignN
David Bateman <dbateman@free.fr>
parents:
7642
diff
changeset
|
166 %!test |
ad16ea379d2f
additional fixes for Array::assignN
David Bateman <dbateman@free.fr>
parents:
7642
diff
changeset
|
167 %! a(:,:,1) = 1:4;; |
ad16ea379d2f
additional fixes for Array::assignN
David Bateman <dbateman@free.fr>
parents:
7642
diff
changeset
|
168 %! assert (a, [1:4]); |
ad16ea379d2f
additional fixes for Array::assignN
David Bateman <dbateman@free.fr>
parents:
7642
diff
changeset
|
169 |
ad16ea379d2f
additional fixes for Array::assignN
David Bateman <dbateman@free.fr>
parents:
7642
diff
changeset
|
170 %!test |
ad16ea379d2f
additional fixes for Array::assignN
David Bateman <dbateman@free.fr>
parents:
7642
diff
changeset
|
171 %! a(:,:,1) = [1:4]'; |
ad16ea379d2f
additional fixes for Array::assignN
David Bateman <dbateman@free.fr>
parents:
7642
diff
changeset
|
172 %! assert (a, [1:4]'); |
ad16ea379d2f
additional fixes for Array::assignN
David Bateman <dbateman@free.fr>
parents:
7642
diff
changeset
|
173 |
ad16ea379d2f
additional fixes for Array::assignN
David Bateman <dbateman@free.fr>
parents:
7642
diff
changeset
|
174 %!test |
14131
c3309e1ec50d
test: Use Octave coding and spacing conventions for fixed test scripts
Rik <octave@nomad.inbox5.com>
parents:
14127
diff
changeset
|
175 %! a(:,:,1) = reshape (1:4,[1,1,4]); |
7646
ad16ea379d2f
additional fixes for Array::assignN
David Bateman <dbateman@free.fr>
parents:
7642
diff
changeset
|
176 %! assert (a, [1:4]'); |
ad16ea379d2f
additional fixes for Array::assignN
David Bateman <dbateman@free.fr>
parents:
7642
diff
changeset
|
177 |
ad16ea379d2f
additional fixes for Array::assignN
David Bateman <dbateman@free.fr>
parents:
7642
diff
changeset
|
178 %!test |
ad16ea379d2f
additional fixes for Array::assignN
David Bateman <dbateman@free.fr>
parents:
7642
diff
changeset
|
179 %! a(:,1,:) = 1:4; |
ad16ea379d2f
additional fixes for Array::assignN
David Bateman <dbateman@free.fr>
parents:
7642
diff
changeset
|
180 %! assert (a, reshape (1:4,[1,1,4])); |
ad16ea379d2f
additional fixes for Array::assignN
David Bateman <dbateman@free.fr>
parents:
7642
diff
changeset
|
181 |
ad16ea379d2f
additional fixes for Array::assignN
David Bateman <dbateman@free.fr>
parents:
7642
diff
changeset
|
182 %!test |
ad16ea379d2f
additional fixes for Array::assignN
David Bateman <dbateman@free.fr>
parents:
7642
diff
changeset
|
183 %! a(:,1,:) = [1:4]'; |
ad16ea379d2f
additional fixes for Array::assignN
David Bateman <dbateman@free.fr>
parents:
7642
diff
changeset
|
184 %! assert (a, [1:4]'); |
ad16ea379d2f
additional fixes for Array::assignN
David Bateman <dbateman@free.fr>
parents:
7642
diff
changeset
|
185 |
ad16ea379d2f
additional fixes for Array::assignN
David Bateman <dbateman@free.fr>
parents:
7642
diff
changeset
|
186 %!test |
14131
c3309e1ec50d
test: Use Octave coding and spacing conventions for fixed test scripts
Rik <octave@nomad.inbox5.com>
parents:
14127
diff
changeset
|
187 %! a(:,1,:) = reshape (1:4,[1,1,4]);; |
7646
ad16ea379d2f
additional fixes for Array::assignN
David Bateman <dbateman@free.fr>
parents:
7642
diff
changeset
|
188 %! assert (a, [1:4]'); |
ad16ea379d2f
additional fixes for Array::assignN
David Bateman <dbateman@free.fr>
parents:
7642
diff
changeset
|
189 |
ad16ea379d2f
additional fixes for Array::assignN
David Bateman <dbateman@free.fr>
parents:
7642
diff
changeset
|
190 %!test |
ad16ea379d2f
additional fixes for Array::assignN
David Bateman <dbateman@free.fr>
parents:
7642
diff
changeset
|
191 %! a(1,:,:) = 1:4; |
ad16ea379d2f
additional fixes for Array::assignN
David Bateman <dbateman@free.fr>
parents:
7642
diff
changeset
|
192 %! assert (a, reshape (1:4,[1,1,4])); |
ad16ea379d2f
additional fixes for Array::assignN
David Bateman <dbateman@free.fr>
parents:
7642
diff
changeset
|
193 |
ad16ea379d2f
additional fixes for Array::assignN
David Bateman <dbateman@free.fr>
parents:
7642
diff
changeset
|
194 %!test |
ad16ea379d2f
additional fixes for Array::assignN
David Bateman <dbateman@free.fr>
parents:
7642
diff
changeset
|
195 %! a(1,:,:) = [1:4]'; |
ad16ea379d2f
additional fixes for Array::assignN
David Bateman <dbateman@free.fr>
parents:
7642
diff
changeset
|
196 %! assert (a, [1:4]); |
ad16ea379d2f
additional fixes for Array::assignN
David Bateman <dbateman@free.fr>
parents:
7642
diff
changeset
|
197 |
ad16ea379d2f
additional fixes for Array::assignN
David Bateman <dbateman@free.fr>
parents:
7642
diff
changeset
|
198 %!test |
14131
c3309e1ec50d
test: Use Octave coding and spacing conventions for fixed test scripts
Rik <octave@nomad.inbox5.com>
parents:
14127
diff
changeset
|
199 %! a(1,:,:) = reshape (1:4,[1,1,4]); |
7646
ad16ea379d2f
additional fixes for Array::assignN
David Bateman <dbateman@free.fr>
parents:
7642
diff
changeset
|
200 %! assert (a, [1:4]); |
ad16ea379d2f
additional fixes for Array::assignN
David Bateman <dbateman@free.fr>
parents:
7642
diff
changeset
|
201 |
ad16ea379d2f
additional fixes for Array::assignN
David Bateman <dbateman@free.fr>
parents:
7642
diff
changeset
|
202 %!test |
14131
c3309e1ec50d
test: Use Octave coding and spacing conventions for fixed test scripts
Rik <octave@nomad.inbox5.com>
parents:
14127
diff
changeset
|
203 %! a(1,:,:,:) = reshape (1:4,[1,1,4]); |
7646
ad16ea379d2f
additional fixes for Array::assignN
David Bateman <dbateman@free.fr>
parents:
7642
diff
changeset
|
204 %! assert (a, reshape (1:4,[1,1,1,4])); |
ad16ea379d2f
additional fixes for Array::assignN
David Bateman <dbateman@free.fr>
parents:
7642
diff
changeset
|
205 |
ad16ea379d2f
additional fixes for Array::assignN
David Bateman <dbateman@free.fr>
parents:
7642
diff
changeset
|
206 %!error (a(1:2,1:2) = 1:4) |
14127
b5e819930fd5
Give friendlier error message when indexing with default i or j (bug #35157)
Jordi Gutiérrez Hermoso <jordigh@octave.org>
parents:
14126
diff
changeset
|
207 |
b5e819930fd5
Give friendlier error message when indexing with default i or j (bug #35157)
Jordi Gutiérrez Hermoso <jordigh@octave.org>
parents:
14126
diff
changeset
|
208 %!shared x |
b5e819930fd5
Give friendlier error message when indexing with default i or j (bug #35157)
Jordi Gutiérrez Hermoso <jordigh@octave.org>
parents:
14126
diff
changeset
|
209 %! x = 1:5; |
b5e819930fd5
Give friendlier error message when indexing with default i or j (bug #35157)
Jordi Gutiérrez Hermoso <jordigh@octave.org>
parents:
14126
diff
changeset
|
210 %!error <attempted to use a complex scalar as an index> x(i) |
b5e819930fd5
Give friendlier error message when indexing with default i or j (bug #35157)
Jordi Gutiérrez Hermoso <jordigh@octave.org>
parents:
14126
diff
changeset
|
211 %!error <attempted to use a complex scalar as an index> x(j) |
b5e819930fd5
Give friendlier error message when indexing with default i or j (bug #35157)
Jordi Gutiérrez Hermoso <jordigh@octave.org>
parents:
14126
diff
changeset
|
212 %!error <attempted to use a complex scalar as an index> x(1+i) |
16073
1c8234f0b642
Fix bounds-checking in diagonal matrices (bug #38357)
Jordi Gutiérrez Hermoso <jordigh@octave.org>
parents:
16030
diff
changeset
|
213 |
1c8234f0b642
Fix bounds-checking in diagonal matrices (bug #38357)
Jordi Gutiérrez Hermoso <jordigh@octave.org>
parents:
16030
diff
changeset
|
214 ## bug #38357 |
1c8234f0b642
Fix bounds-checking in diagonal matrices (bug #38357)
Jordi Gutiérrez Hermoso <jordigh@octave.org>
parents:
16030
diff
changeset
|
215 %!shared d, dd |
1c8234f0b642
Fix bounds-checking in diagonal matrices (bug #38357)
Jordi Gutiérrez Hermoso <jordigh@octave.org>
parents:
16030
diff
changeset
|
216 %! d = diag ([1, 2, 3]); |
1c8234f0b642
Fix bounds-checking in diagonal matrices (bug #38357)
Jordi Gutiérrez Hermoso <jordigh@octave.org>
parents:
16030
diff
changeset
|
217 %! dd = diag ([1, 2, 3], 6, 3); |
1c8234f0b642
Fix bounds-checking in diagonal matrices (bug #38357)
Jordi Gutiérrez Hermoso <jordigh@octave.org>
parents:
16030
diff
changeset
|
218 %!assert (d(1), 1); |
1c8234f0b642
Fix bounds-checking in diagonal matrices (bug #38357)
Jordi Gutiérrez Hermoso <jordigh@octave.org>
parents:
16030
diff
changeset
|
219 %!assert (dd(1), 1); |
1c8234f0b642
Fix bounds-checking in diagonal matrices (bug #38357)
Jordi Gutiérrez Hermoso <jordigh@octave.org>
parents:
16030
diff
changeset
|
220 %!assert (d(3, 3), 3); |
1c8234f0b642
Fix bounds-checking in diagonal matrices (bug #38357)
Jordi Gutiérrez Hermoso <jordigh@octave.org>
parents:
16030
diff
changeset
|
221 %!assert (dd(3, 3), 3); |
1c8234f0b642
Fix bounds-checking in diagonal matrices (bug #38357)
Jordi Gutiérrez Hermoso <jordigh@octave.org>
parents:
16030
diff
changeset
|
222 %!assert (d(2), 0); |
1c8234f0b642
Fix bounds-checking in diagonal matrices (bug #38357)
Jordi Gutiérrez Hermoso <jordigh@octave.org>
parents:
16030
diff
changeset
|
223 %!assert (dd(2), 0); |
1c8234f0b642
Fix bounds-checking in diagonal matrices (bug #38357)
Jordi Gutiérrez Hermoso <jordigh@octave.org>
parents:
16030
diff
changeset
|
224 %!assert (dd(6,1), 0); |
1c8234f0b642
Fix bounds-checking in diagonal matrices (bug #38357)
Jordi Gutiérrez Hermoso <jordigh@octave.org>
parents:
16030
diff
changeset
|
225 %!error d(6,6); |
1c8234f0b642
Fix bounds-checking in diagonal matrices (bug #38357)
Jordi Gutiérrez Hermoso <jordigh@octave.org>
parents:
16030
diff
changeset
|
226 %!error dd(6,6); |
1c8234f0b642
Fix bounds-checking in diagonal matrices (bug #38357)
Jordi Gutiérrez Hermoso <jordigh@octave.org>
parents:
16030
diff
changeset
|
227 %!error d(3,6); |
1c8234f0b642
Fix bounds-checking in diagonal matrices (bug #38357)
Jordi Gutiérrez Hermoso <jordigh@octave.org>
parents:
16030
diff
changeset
|
228 %!error dd(3,6); |
1c8234f0b642
Fix bounds-checking in diagonal matrices (bug #38357)
Jordi Gutiérrez Hermoso <jordigh@octave.org>
parents:
16030
diff
changeset
|
229 |
17642
7ed397c8ca68
improve compatibility of null assignment (bug #31287)
John W. Eaton <jwe@octave.org>
parents:
17336
diff
changeset
|
230 ## bug 31287 |
7ed397c8ca68
improve compatibility of null assignment (bug #31287)
John W. Eaton <jwe@octave.org>
parents:
17336
diff
changeset
|
231 %!test |
7ed397c8ca68
improve compatibility of null assignment (bug #31287)
John W. Eaton <jwe@octave.org>
parents:
17336
diff
changeset
|
232 %! y = ones (2, 2, 2); |
7ed397c8ca68
improve compatibility of null assignment (bug #31287)
John W. Eaton <jwe@octave.org>
parents:
17336
diff
changeset
|
233 %! x = ones (2, 2, 2); |
7ed397c8ca68
improve compatibility of null assignment (bug #31287)
John W. Eaton <jwe@octave.org>
parents:
17336
diff
changeset
|
234 %! x(false) = []; |
7ed397c8ca68
improve compatibility of null assignment (bug #31287)
John W. Eaton <jwe@octave.org>
parents:
17336
diff
changeset
|
235 %! assert (x, y); |
7ed397c8ca68
improve compatibility of null assignment (bug #31287)
John W. Eaton <jwe@octave.org>
parents:
17336
diff
changeset
|
236 |
7ed397c8ca68
improve compatibility of null assignment (bug #31287)
John W. Eaton <jwe@octave.org>
parents:
17336
diff
changeset
|
237 %!test |
7ed397c8ca68
improve compatibility of null assignment (bug #31287)
John W. Eaton <jwe@octave.org>
parents:
17336
diff
changeset
|
238 %! y = ones (2, 2, 2); |
7ed397c8ca68
improve compatibility of null assignment (bug #31287)
John W. Eaton <jwe@octave.org>
parents:
17336
diff
changeset
|
239 %! x = ones (2, 2, 2); |
7ed397c8ca68
improve compatibility of null assignment (bug #31287)
John W. Eaton <jwe@octave.org>
parents:
17336
diff
changeset
|
240 %! x(false,[]) = []; |
7ed397c8ca68
improve compatibility of null assignment (bug #31287)
John W. Eaton <jwe@octave.org>
parents:
17336
diff
changeset
|
241 %! assert (x, y); |
7ed397c8ca68
improve compatibility of null assignment (bug #31287)
John W. Eaton <jwe@octave.org>
parents:
17336
diff
changeset
|
242 |
7ed397c8ca68
improve compatibility of null assignment (bug #31287)
John W. Eaton <jwe@octave.org>
parents:
17336
diff
changeset
|
243 %!test |
7ed397c8ca68
improve compatibility of null assignment (bug #31287)
John W. Eaton <jwe@octave.org>
parents:
17336
diff
changeset
|
244 %! y = ones (2, 2, 2); |
7ed397c8ca68
improve compatibility of null assignment (bug #31287)
John W. Eaton <jwe@octave.org>
parents:
17336
diff
changeset
|
245 %! x = ones (2, 2, 2); |
7ed397c8ca68
improve compatibility of null assignment (bug #31287)
John W. Eaton <jwe@octave.org>
parents:
17336
diff
changeset
|
246 %! x(false,[],false) = []; |
7ed397c8ca68
improve compatibility of null assignment (bug #31287)
John W. Eaton <jwe@octave.org>
parents:
17336
diff
changeset
|
247 %! assert (x, y); |
7ed397c8ca68
improve compatibility of null assignment (bug #31287)
John W. Eaton <jwe@octave.org>
parents:
17336
diff
changeset
|
248 |
7ed397c8ca68
improve compatibility of null assignment (bug #31287)
John W. Eaton <jwe@octave.org>
parents:
17336
diff
changeset
|
249 %!shared x, y |
7ed397c8ca68
improve compatibility of null assignment (bug #31287)
John W. Eaton <jwe@octave.org>
parents:
17336
diff
changeset
|
250 %! y = ones (2, 2, 2); |
7ed397c8ca68
improve compatibility of null assignment (bug #31287)
John W. Eaton <jwe@octave.org>
parents:
17336
diff
changeset
|
251 %! x = ones (2, 2, 2); |
7ed397c8ca68
improve compatibility of null assignment (bug #31287)
John W. Eaton <jwe@octave.org>
parents:
17336
diff
changeset
|
252 %! x(false, 1) = []; |
7ed397c8ca68
improve compatibility of null assignment (bug #31287)
John W. Eaton <jwe@octave.org>
parents:
17336
diff
changeset
|
253 %! assert (x, y); |
7ed397c8ca68
improve compatibility of null assignment (bug #31287)
John W. Eaton <jwe@octave.org>
parents:
17336
diff
changeset
|
254 |
7ed397c8ca68
improve compatibility of null assignment (bug #31287)
John W. Eaton <jwe@octave.org>
parents:
17336
diff
changeset
|
255 %!shared x, y |
7ed397c8ca68
improve compatibility of null assignment (bug #31287)
John W. Eaton <jwe@octave.org>
parents:
17336
diff
changeset
|
256 %! y = ones (2, 2, 2); |
7ed397c8ca68
improve compatibility of null assignment (bug #31287)
John W. Eaton <jwe@octave.org>
parents:
17336
diff
changeset
|
257 %! x = ones (2, 2, 2); |
7ed397c8ca68
improve compatibility of null assignment (bug #31287)
John W. Eaton <jwe@octave.org>
parents:
17336
diff
changeset
|
258 %! x(false, false) = []; |
7ed397c8ca68
improve compatibility of null assignment (bug #31287)
John W. Eaton <jwe@octave.org>
parents:
17336
diff
changeset
|
259 %! assert (x, y); |
7ed397c8ca68
improve compatibility of null assignment (bug #31287)
John W. Eaton <jwe@octave.org>
parents:
17336
diff
changeset
|
260 |
7ed397c8ca68
improve compatibility of null assignment (bug #31287)
John W. Eaton <jwe@octave.org>
parents:
17336
diff
changeset
|
261 %!test |
7ed397c8ca68
improve compatibility of null assignment (bug #31287)
John W. Eaton <jwe@octave.org>
parents:
17336
diff
changeset
|
262 %! y = ones (2, 2); |
7ed397c8ca68
improve compatibility of null assignment (bug #31287)
John W. Eaton <jwe@octave.org>
parents:
17336
diff
changeset
|
263 %! x = ones (2, 2); |
7ed397c8ca68
improve compatibility of null assignment (bug #31287)
John W. Eaton <jwe@octave.org>
parents:
17336
diff
changeset
|
264 %! x([], []) = []; |
7ed397c8ca68
improve compatibility of null assignment (bug #31287)
John W. Eaton <jwe@octave.org>
parents:
17336
diff
changeset
|
265 %! assert (x, y); |
7ed397c8ca68
improve compatibility of null assignment (bug #31287)
John W. Eaton <jwe@octave.org>
parents:
17336
diff
changeset
|
266 |
7ed397c8ca68
improve compatibility of null assignment (bug #31287)
John W. Eaton <jwe@octave.org>
parents:
17336
diff
changeset
|
267 %!test |
7ed397c8ca68
improve compatibility of null assignment (bug #31287)
John W. Eaton <jwe@octave.org>
parents:
17336
diff
changeset
|
268 %! y = sparse (ones (2, 2)); |
7ed397c8ca68
improve compatibility of null assignment (bug #31287)
John W. Eaton <jwe@octave.org>
parents:
17336
diff
changeset
|
269 %! x = sparse (ones (2, 2)); |
7ed397c8ca68
improve compatibility of null assignment (bug #31287)
John W. Eaton <jwe@octave.org>
parents:
17336
diff
changeset
|
270 %! x([], []) = []; |
7ed397c8ca68
improve compatibility of null assignment (bug #31287)
John W. Eaton <jwe@octave.org>
parents:
17336
diff
changeset
|
271 %! assert (x, y); |
7ed397c8ca68
improve compatibility of null assignment (bug #31287)
John W. Eaton <jwe@octave.org>
parents:
17336
diff
changeset
|
272 |
7ed397c8ca68
improve compatibility of null assignment (bug #31287)
John W. Eaton <jwe@octave.org>
parents:
17336
diff
changeset
|
273 %!test |
7ed397c8ca68
improve compatibility of null assignment (bug #31287)
John W. Eaton <jwe@octave.org>
parents:
17336
diff
changeset
|
274 %! y = ones (2, 2); |
7ed397c8ca68
improve compatibility of null assignment (bug #31287)
John W. Eaton <jwe@octave.org>
parents:
17336
diff
changeset
|
275 %! x = ones (2, 2); |
7ed397c8ca68
improve compatibility of null assignment (bug #31287)
John W. Eaton <jwe@octave.org>
parents:
17336
diff
changeset
|
276 %! x(1, []) = []; |
7ed397c8ca68
improve compatibility of null assignment (bug #31287)
John W. Eaton <jwe@octave.org>
parents:
17336
diff
changeset
|
277 %! assert (x, y); |
7ed397c8ca68
improve compatibility of null assignment (bug #31287)
John W. Eaton <jwe@octave.org>
parents:
17336
diff
changeset
|
278 |
7ed397c8ca68
improve compatibility of null assignment (bug #31287)
John W. Eaton <jwe@octave.org>
parents:
17336
diff
changeset
|
279 %!test |
7ed397c8ca68
improve compatibility of null assignment (bug #31287)
John W. Eaton <jwe@octave.org>
parents:
17336
diff
changeset
|
280 %! y = ones (2, 2); |
7ed397c8ca68
improve compatibility of null assignment (bug #31287)
John W. Eaton <jwe@octave.org>
parents:
17336
diff
changeset
|
281 %! x = ones (2, 2); |
7ed397c8ca68
improve compatibility of null assignment (bug #31287)
John W. Eaton <jwe@octave.org>
parents:
17336
diff
changeset
|
282 %! x([], 1, []) = []; |
7ed397c8ca68
improve compatibility of null assignment (bug #31287)
John W. Eaton <jwe@octave.org>
parents:
17336
diff
changeset
|
283 %! assert (x, y); |
7ed397c8ca68
improve compatibility of null assignment (bug #31287)
John W. Eaton <jwe@octave.org>
parents:
17336
diff
changeset
|
284 |
7ed397c8ca68
improve compatibility of null assignment (bug #31287)
John W. Eaton <jwe@octave.org>
parents:
17336
diff
changeset
|
285 %!test |
7ed397c8ca68
improve compatibility of null assignment (bug #31287)
John W. Eaton <jwe@octave.org>
parents:
17336
diff
changeset
|
286 %! y = ones (2, 2); |
7ed397c8ca68
improve compatibility of null assignment (bug #31287)
John W. Eaton <jwe@octave.org>
parents:
17336
diff
changeset
|
287 %! x = ones (2, 2); |
7ed397c8ca68
improve compatibility of null assignment (bug #31287)
John W. Eaton <jwe@octave.org>
parents:
17336
diff
changeset
|
288 %! x(1, [], 1, 1) = []; |
7ed397c8ca68
improve compatibility of null assignment (bug #31287)
John W. Eaton <jwe@octave.org>
parents:
17336
diff
changeset
|
289 %! assert (x, y); |
7ed397c8ca68
improve compatibility of null assignment (bug #31287)
John W. Eaton <jwe@octave.org>
parents:
17336
diff
changeset
|
290 |
7ed397c8ca68
improve compatibility of null assignment (bug #31287)
John W. Eaton <jwe@octave.org>
parents:
17336
diff
changeset
|
291 %!test |
7ed397c8ca68
improve compatibility of null assignment (bug #31287)
John W. Eaton <jwe@octave.org>
parents:
17336
diff
changeset
|
292 %! y = ones (2, 2); |
7ed397c8ca68
improve compatibility of null assignment (bug #31287)
John W. Eaton <jwe@octave.org>
parents:
17336
diff
changeset
|
293 %! x = ones (2, 2); |
7ed397c8ca68
improve compatibility of null assignment (bug #31287)
John W. Eaton <jwe@octave.org>
parents:
17336
diff
changeset
|
294 %! x([], 1, 1) = []; |
7ed397c8ca68
improve compatibility of null assignment (bug #31287)
John W. Eaton <jwe@octave.org>
parents:
17336
diff
changeset
|
295 %! assert (x, y); |
7ed397c8ca68
improve compatibility of null assignment (bug #31287)
John W. Eaton <jwe@octave.org>
parents:
17336
diff
changeset
|
296 |
7ed397c8ca68
improve compatibility of null assignment (bug #31287)
John W. Eaton <jwe@octave.org>
parents:
17336
diff
changeset
|
297 %!test |
7ed397c8ca68
improve compatibility of null assignment (bug #31287)
John W. Eaton <jwe@octave.org>
parents:
17336
diff
changeset
|
298 %! y = ones (2, 2); |
7ed397c8ca68
improve compatibility of null assignment (bug #31287)
John W. Eaton <jwe@octave.org>
parents:
17336
diff
changeset
|
299 %! x = ones (2, 2); |
7ed397c8ca68
improve compatibility of null assignment (bug #31287)
John W. Eaton <jwe@octave.org>
parents:
17336
diff
changeset
|
300 %! ea2 = ones (3, 2, 0, 2); |
7ed397c8ca68
improve compatibility of null assignment (bug #31287)
John W. Eaton <jwe@octave.org>
parents:
17336
diff
changeset
|
301 %! x(1, ea2) = []; |
7ed397c8ca68
improve compatibility of null assignment (bug #31287)
John W. Eaton <jwe@octave.org>
parents:
17336
diff
changeset
|
302 %! assert (x, y); |
7ed397c8ca68
improve compatibility of null assignment (bug #31287)
John W. Eaton <jwe@octave.org>
parents:
17336
diff
changeset
|
303 |
7ed397c8ca68
improve compatibility of null assignment (bug #31287)
John W. Eaton <jwe@octave.org>
parents:
17336
diff
changeset
|
304 %!test |
7ed397c8ca68
improve compatibility of null assignment (bug #31287)
John W. Eaton <jwe@octave.org>
parents:
17336
diff
changeset
|
305 %! y = sparse (ones (2, 2)); |
7ed397c8ca68
improve compatibility of null assignment (bug #31287)
John W. Eaton <jwe@octave.org>
parents:
17336
diff
changeset
|
306 %! x = sparse (ones (2, 2)); |
7ed397c8ca68
improve compatibility of null assignment (bug #31287)
John W. Eaton <jwe@octave.org>
parents:
17336
diff
changeset
|
307 %! ea2 = ones (3, 2, 0, 2); |
7ed397c8ca68
improve compatibility of null assignment (bug #31287)
John W. Eaton <jwe@octave.org>
parents:
17336
diff
changeset
|
308 %! x(1, ea2) = []; |
7ed397c8ca68
improve compatibility of null assignment (bug #31287)
John W. Eaton <jwe@octave.org>
parents:
17336
diff
changeset
|
309 %! assert (x, y); |
7ed397c8ca68
improve compatibility of null assignment (bug #31287)
John W. Eaton <jwe@octave.org>
parents:
17336
diff
changeset
|
310 |
7ed397c8ca68
improve compatibility of null assignment (bug #31287)
John W. Eaton <jwe@octave.org>
parents:
17336
diff
changeset
|
311 %!test |
7ed397c8ca68
improve compatibility of null assignment (bug #31287)
John W. Eaton <jwe@octave.org>
parents:
17336
diff
changeset
|
312 %! y = ones (2, 2); |
7ed397c8ca68
improve compatibility of null assignment (bug #31287)
John W. Eaton <jwe@octave.org>
parents:
17336
diff
changeset
|
313 %! x = ones (2, 2); |
7ed397c8ca68
improve compatibility of null assignment (bug #31287)
John W. Eaton <jwe@octave.org>
parents:
17336
diff
changeset
|
314 %! ea2 = ones (3, 2, 0, 2); |
7ed397c8ca68
improve compatibility of null assignment (bug #31287)
John W. Eaton <jwe@octave.org>
parents:
17336
diff
changeset
|
315 %! x([], 1, ea2) = []; |
7ed397c8ca68
improve compatibility of null assignment (bug #31287)
John W. Eaton <jwe@octave.org>
parents:
17336
diff
changeset
|
316 %! assert (x, y); |
7ed397c8ca68
improve compatibility of null assignment (bug #31287)
John W. Eaton <jwe@octave.org>
parents:
17336
diff
changeset
|
317 |
7ed397c8ca68
improve compatibility of null assignment (bug #31287)
John W. Eaton <jwe@octave.org>
parents:
17336
diff
changeset
|
318 %!test |
7ed397c8ca68
improve compatibility of null assignment (bug #31287)
John W. Eaton <jwe@octave.org>
parents:
17336
diff
changeset
|
319 %! y = ones (2, 2); |
7ed397c8ca68
improve compatibility of null assignment (bug #31287)
John W. Eaton <jwe@octave.org>
parents:
17336
diff
changeset
|
320 %! x = ones (2, 2); |
7ed397c8ca68
improve compatibility of null assignment (bug #31287)
John W. Eaton <jwe@octave.org>
parents:
17336
diff
changeset
|
321 %! ea2 = ones (3, 2, 0, 2); |
7ed397c8ca68
improve compatibility of null assignment (bug #31287)
John W. Eaton <jwe@octave.org>
parents:
17336
diff
changeset
|
322 %! x(1, ea2, ea2) = []; |
7ed397c8ca68
improve compatibility of null assignment (bug #31287)
John W. Eaton <jwe@octave.org>
parents:
17336
diff
changeset
|
323 %! assert (x, y); |
7ed397c8ca68
improve compatibility of null assignment (bug #31287)
John W. Eaton <jwe@octave.org>
parents:
17336
diff
changeset
|
324 |
7ed397c8ca68
improve compatibility of null assignment (bug #31287)
John W. Eaton <jwe@octave.org>
parents:
17336
diff
changeset
|
325 %!test |
7ed397c8ca68
improve compatibility of null assignment (bug #31287)
John W. Eaton <jwe@octave.org>
parents:
17336
diff
changeset
|
326 %! y = ones (2, 2); |
7ed397c8ca68
improve compatibility of null assignment (bug #31287)
John W. Eaton <jwe@octave.org>
parents:
17336
diff
changeset
|
327 %! x = ones (2, 2); |
7ed397c8ca68
improve compatibility of null assignment (bug #31287)
John W. Eaton <jwe@octave.org>
parents:
17336
diff
changeset
|
328 %! ea2 = ones (3, 2, 0, 2); |
7ed397c8ca68
improve compatibility of null assignment (bug #31287)
John W. Eaton <jwe@octave.org>
parents:
17336
diff
changeset
|
329 %! x(1, ea2, 1) = []; |
7ed397c8ca68
improve compatibility of null assignment (bug #31287)
John W. Eaton <jwe@octave.org>
parents:
17336
diff
changeset
|
330 %! assert (x, y); |
7ed397c8ca68
improve compatibility of null assignment (bug #31287)
John W. Eaton <jwe@octave.org>
parents:
17336
diff
changeset
|
331 |
7ed397c8ca68
improve compatibility of null assignment (bug #31287)
John W. Eaton <jwe@octave.org>
parents:
17336
diff
changeset
|
332 %!test |
7ed397c8ca68
improve compatibility of null assignment (bug #31287)
John W. Eaton <jwe@octave.org>
parents:
17336
diff
changeset
|
333 %! y = ones (2, 2); |
7ed397c8ca68
improve compatibility of null assignment (bug #31287)
John W. Eaton <jwe@octave.org>
parents:
17336
diff
changeset
|
334 %! x = ones (2, 2); |
7ed397c8ca68
improve compatibility of null assignment (bug #31287)
John W. Eaton <jwe@octave.org>
parents:
17336
diff
changeset
|
335 %! x(false, 1) = []; |
7ed397c8ca68
improve compatibility of null assignment (bug #31287)
John W. Eaton <jwe@octave.org>
parents:
17336
diff
changeset
|
336 %! assert (x, y); |
7ed397c8ca68
improve compatibility of null assignment (bug #31287)
John W. Eaton <jwe@octave.org>
parents:
17336
diff
changeset
|
337 |
7ed397c8ca68
improve compatibility of null assignment (bug #31287)
John W. Eaton <jwe@octave.org>
parents:
17336
diff
changeset
|
338 %!test |
7ed397c8ca68
improve compatibility of null assignment (bug #31287)
John W. Eaton <jwe@octave.org>
parents:
17336
diff
changeset
|
339 %! y = sparse (ones (2, 2)); |
7ed397c8ca68
improve compatibility of null assignment (bug #31287)
John W. Eaton <jwe@octave.org>
parents:
17336
diff
changeset
|
340 %! x = sparse (ones (2, 2)); |
7ed397c8ca68
improve compatibility of null assignment (bug #31287)
John W. Eaton <jwe@octave.org>
parents:
17336
diff
changeset
|
341 %! x(false, 1) = []; |
7ed397c8ca68
improve compatibility of null assignment (bug #31287)
John W. Eaton <jwe@octave.org>
parents:
17336
diff
changeset
|
342 %! assert (x, y); |
7ed397c8ca68
improve compatibility of null assignment (bug #31287)
John W. Eaton <jwe@octave.org>
parents:
17336
diff
changeset
|
343 |
7ed397c8ca68
improve compatibility of null assignment (bug #31287)
John W. Eaton <jwe@octave.org>
parents:
17336
diff
changeset
|
344 %!test |
7ed397c8ca68
improve compatibility of null assignment (bug #31287)
John W. Eaton <jwe@octave.org>
parents:
17336
diff
changeset
|
345 %! y = ones (2, 2); |
7ed397c8ca68
improve compatibility of null assignment (bug #31287)
John W. Eaton <jwe@octave.org>
parents:
17336
diff
changeset
|
346 %! x = ones (2, 2); |
7ed397c8ca68
improve compatibility of null assignment (bug #31287)
John W. Eaton <jwe@octave.org>
parents:
17336
diff
changeset
|
347 %! x(1, [], false) = []; |
7ed397c8ca68
improve compatibility of null assignment (bug #31287)
John W. Eaton <jwe@octave.org>
parents:
17336
diff
changeset
|
348 %! assert (x, y); |
7ed397c8ca68
improve compatibility of null assignment (bug #31287)
John W. Eaton <jwe@octave.org>
parents:
17336
diff
changeset
|
349 |
7ed397c8ca68
improve compatibility of null assignment (bug #31287)
John W. Eaton <jwe@octave.org>
parents:
17336
diff
changeset
|
350 %!test |
7ed397c8ca68
improve compatibility of null assignment (bug #31287)
John W. Eaton <jwe@octave.org>
parents:
17336
diff
changeset
|
351 %! y = ones (2, 2); |
7ed397c8ca68
improve compatibility of null assignment (bug #31287)
John W. Eaton <jwe@octave.org>
parents:
17336
diff
changeset
|
352 %! x = ones (2, 2); |
7ed397c8ca68
improve compatibility of null assignment (bug #31287)
John W. Eaton <jwe@octave.org>
parents:
17336
diff
changeset
|
353 %! x(false, false) = []; |
7ed397c8ca68
improve compatibility of null assignment (bug #31287)
John W. Eaton <jwe@octave.org>
parents:
17336
diff
changeset
|
354 %! assert (x, y); |
7ed397c8ca68
improve compatibility of null assignment (bug #31287)
John W. Eaton <jwe@octave.org>
parents:
17336
diff
changeset
|
355 |
7ed397c8ca68
improve compatibility of null assignment (bug #31287)
John W. Eaton <jwe@octave.org>
parents:
17336
diff
changeset
|
356 %!test |
7ed397c8ca68
improve compatibility of null assignment (bug #31287)
John W. Eaton <jwe@octave.org>
parents:
17336
diff
changeset
|
357 %! y = sparse (ones (2, 2)); |
7ed397c8ca68
improve compatibility of null assignment (bug #31287)
John W. Eaton <jwe@octave.org>
parents:
17336
diff
changeset
|
358 %! x = sparse (ones (2, 2)); |
7ed397c8ca68
improve compatibility of null assignment (bug #31287)
John W. Eaton <jwe@octave.org>
parents:
17336
diff
changeset
|
359 %! x(false, false) = []; |
7ed397c8ca68
improve compatibility of null assignment (bug #31287)
John W. Eaton <jwe@octave.org>
parents:
17336
diff
changeset
|
360 %! assert (x, y); |
7ed397c8ca68
improve compatibility of null assignment (bug #31287)
John W. Eaton <jwe@octave.org>
parents:
17336
diff
changeset
|
361 |
7ed397c8ca68
improve compatibility of null assignment (bug #31287)
John W. Eaton <jwe@octave.org>
parents:
17336
diff
changeset
|
362 %!test |
7ed397c8ca68
improve compatibility of null assignment (bug #31287)
John W. Eaton <jwe@octave.org>
parents:
17336
diff
changeset
|
363 %! y = ones (2, 2); |
7ed397c8ca68
improve compatibility of null assignment (bug #31287)
John W. Eaton <jwe@octave.org>
parents:
17336
diff
changeset
|
364 %! x = ones (2, 2); |
7ed397c8ca68
improve compatibility of null assignment (bug #31287)
John W. Eaton <jwe@octave.org>
parents:
17336
diff
changeset
|
365 %! x(false, [], false) = []; |
7ed397c8ca68
improve compatibility of null assignment (bug #31287)
John W. Eaton <jwe@octave.org>
parents:
17336
diff
changeset
|
366 %! assert (x, y); |
7ed397c8ca68
improve compatibility of null assignment (bug #31287)
John W. Eaton <jwe@octave.org>
parents:
17336
diff
changeset
|
367 |
7ed397c8ca68
improve compatibility of null assignment (bug #31287)
John W. Eaton <jwe@octave.org>
parents:
17336
diff
changeset
|
368 %!test |
7ed397c8ca68
improve compatibility of null assignment (bug #31287)
John W. Eaton <jwe@octave.org>
parents:
17336
diff
changeset
|
369 %! y = ones (2, 2); |
7ed397c8ca68
improve compatibility of null assignment (bug #31287)
John W. Eaton <jwe@octave.org>
parents:
17336
diff
changeset
|
370 %! x = ones (2, 2); |
7ed397c8ca68
improve compatibility of null assignment (bug #31287)
John W. Eaton <jwe@octave.org>
parents:
17336
diff
changeset
|
371 %! x([], false, false, false) = []; |
7ed397c8ca68
improve compatibility of null assignment (bug #31287)
John W. Eaton <jwe@octave.org>
parents:
17336
diff
changeset
|
372 %! assert (x, y); |
7ed397c8ca68
improve compatibility of null assignment (bug #31287)
John W. Eaton <jwe@octave.org>
parents:
17336
diff
changeset
|
373 |
7ed397c8ca68
improve compatibility of null assignment (bug #31287)
John W. Eaton <jwe@octave.org>
parents:
17336
diff
changeset
|
374 %!test |
7ed397c8ca68
improve compatibility of null assignment (bug #31287)
John W. Eaton <jwe@octave.org>
parents:
17336
diff
changeset
|
375 %! y = ones (2, 2); |
7ed397c8ca68
improve compatibility of null assignment (bug #31287)
John W. Eaton <jwe@octave.org>
parents:
17336
diff
changeset
|
376 %! x = ones (2, 2); |
7ed397c8ca68
improve compatibility of null assignment (bug #31287)
John W. Eaton <jwe@octave.org>
parents:
17336
diff
changeset
|
377 %! x(1, [], false, false) = []; |
7ed397c8ca68
improve compatibility of null assignment (bug #31287)
John W. Eaton <jwe@octave.org>
parents:
17336
diff
changeset
|
378 %! assert (x, y); |
7ed397c8ca68
improve compatibility of null assignment (bug #31287)
John W. Eaton <jwe@octave.org>
parents:
17336
diff
changeset
|
379 |
7ed397c8ca68
improve compatibility of null assignment (bug #31287)
John W. Eaton <jwe@octave.org>
parents:
17336
diff
changeset
|
380 %!test |
7ed397c8ca68
improve compatibility of null assignment (bug #31287)
John W. Eaton <jwe@octave.org>
parents:
17336
diff
changeset
|
381 %! y = ones (2, 2); |
7ed397c8ca68
improve compatibility of null assignment (bug #31287)
John W. Eaton <jwe@octave.org>
parents:
17336
diff
changeset
|
382 %! x = ones (2, 2); |
7ed397c8ca68
improve compatibility of null assignment (bug #31287)
John W. Eaton <jwe@octave.org>
parents:
17336
diff
changeset
|
383 %! x(:, false) = []; |
7ed397c8ca68
improve compatibility of null assignment (bug #31287)
John W. Eaton <jwe@octave.org>
parents:
17336
diff
changeset
|
384 %! assert (x, y); |
7ed397c8ca68
improve compatibility of null assignment (bug #31287)
John W. Eaton <jwe@octave.org>
parents:
17336
diff
changeset
|
385 |
7ed397c8ca68
improve compatibility of null assignment (bug #31287)
John W. Eaton <jwe@octave.org>
parents:
17336
diff
changeset
|
386 %!test |
7ed397c8ca68
improve compatibility of null assignment (bug #31287)
John W. Eaton <jwe@octave.org>
parents:
17336
diff
changeset
|
387 %! y = sparse (ones (2, 2)); |
7ed397c8ca68
improve compatibility of null assignment (bug #31287)
John W. Eaton <jwe@octave.org>
parents:
17336
diff
changeset
|
388 %! x = sparse (ones (2, 2)); |
7ed397c8ca68
improve compatibility of null assignment (bug #31287)
John W. Eaton <jwe@octave.org>
parents:
17336
diff
changeset
|
389 %! x(:, false) = []; |
7ed397c8ca68
improve compatibility of null assignment (bug #31287)
John W. Eaton <jwe@octave.org>
parents:
17336
diff
changeset
|
390 %! assert (x, y); |
7ed397c8ca68
improve compatibility of null assignment (bug #31287)
John W. Eaton <jwe@octave.org>
parents:
17336
diff
changeset
|
391 |
7ed397c8ca68
improve compatibility of null assignment (bug #31287)
John W. Eaton <jwe@octave.org>
parents:
17336
diff
changeset
|
392 %!test |
7ed397c8ca68
improve compatibility of null assignment (bug #31287)
John W. Eaton <jwe@octave.org>
parents:
17336
diff
changeset
|
393 %! y = ones (2, 2); |
7ed397c8ca68
improve compatibility of null assignment (bug #31287)
John W. Eaton <jwe@octave.org>
parents:
17336
diff
changeset
|
394 %! x = ones (2, 2); |
7ed397c8ca68
improve compatibility of null assignment (bug #31287)
John W. Eaton <jwe@octave.org>
parents:
17336
diff
changeset
|
395 %! x(false, :) = []; |
7ed397c8ca68
improve compatibility of null assignment (bug #31287)
John W. Eaton <jwe@octave.org>
parents:
17336
diff
changeset
|
396 %! assert (x, y); |
7ed397c8ca68
improve compatibility of null assignment (bug #31287)
John W. Eaton <jwe@octave.org>
parents:
17336
diff
changeset
|
397 |
7ed397c8ca68
improve compatibility of null assignment (bug #31287)
John W. Eaton <jwe@octave.org>
parents:
17336
diff
changeset
|
398 %!test |
7ed397c8ca68
improve compatibility of null assignment (bug #31287)
John W. Eaton <jwe@octave.org>
parents:
17336
diff
changeset
|
399 %! y = sparse (ones (2, 2)); |
7ed397c8ca68
improve compatibility of null assignment (bug #31287)
John W. Eaton <jwe@octave.org>
parents:
17336
diff
changeset
|
400 %! x = sparse (ones (2, 2)); |
7ed397c8ca68
improve compatibility of null assignment (bug #31287)
John W. Eaton <jwe@octave.org>
parents:
17336
diff
changeset
|
401 %! x(false, :) = []; |
7ed397c8ca68
improve compatibility of null assignment (bug #31287)
John W. Eaton <jwe@octave.org>
parents:
17336
diff
changeset
|
402 %! assert (x, y); |
7ed397c8ca68
improve compatibility of null assignment (bug #31287)
John W. Eaton <jwe@octave.org>
parents:
17336
diff
changeset
|
403 |
7ed397c8ca68
improve compatibility of null assignment (bug #31287)
John W. Eaton <jwe@octave.org>
parents:
17336
diff
changeset
|
404 %!test |
7ed397c8ca68
improve compatibility of null assignment (bug #31287)
John W. Eaton <jwe@octave.org>
parents:
17336
diff
changeset
|
405 %! y = ones (2, 2); |
7ed397c8ca68
improve compatibility of null assignment (bug #31287)
John W. Eaton <jwe@octave.org>
parents:
17336
diff
changeset
|
406 %! x = ones (2, 2); |
7ed397c8ca68
improve compatibility of null assignment (bug #31287)
John W. Eaton <jwe@octave.org>
parents:
17336
diff
changeset
|
407 %! x(false, :, [], 1) = []; |
7ed397c8ca68
improve compatibility of null assignment (bug #31287)
John W. Eaton <jwe@octave.org>
parents:
17336
diff
changeset
|
408 %! assert (x, y); |
7ed397c8ca68
improve compatibility of null assignment (bug #31287)
John W. Eaton <jwe@octave.org>
parents:
17336
diff
changeset
|
409 |
7ed397c8ca68
improve compatibility of null assignment (bug #31287)
John W. Eaton <jwe@octave.org>
parents:
17336
diff
changeset
|
410 %!test |
7ed397c8ca68
improve compatibility of null assignment (bug #31287)
John W. Eaton <jwe@octave.org>
parents:
17336
diff
changeset
|
411 %! y = ones (2, 2); |
7ed397c8ca68
improve compatibility of null assignment (bug #31287)
John W. Eaton <jwe@octave.org>
parents:
17336
diff
changeset
|
412 %! x = ones (2, 2); |
7ed397c8ca68
improve compatibility of null assignment (bug #31287)
John W. Eaton <jwe@octave.org>
parents:
17336
diff
changeset
|
413 %! x(:, [], false) = []; |
7ed397c8ca68
improve compatibility of null assignment (bug #31287)
John W. Eaton <jwe@octave.org>
parents:
17336
diff
changeset
|
414 %! assert (x, y); |
7ed397c8ca68
improve compatibility of null assignment (bug #31287)
John W. Eaton <jwe@octave.org>
parents:
17336
diff
changeset
|
415 |
7ed397c8ca68
improve compatibility of null assignment (bug #31287)
John W. Eaton <jwe@octave.org>
parents:
17336
diff
changeset
|
416 %!shared x, y |
7ed397c8ca68
improve compatibility of null assignment (bug #31287)
John W. Eaton <jwe@octave.org>
parents:
17336
diff
changeset
|
417 %! y = ones (2, 2); |
7ed397c8ca68
improve compatibility of null assignment (bug #31287)
John W. Eaton <jwe@octave.org>
parents:
17336
diff
changeset
|
418 %! x = ones (2, 2); |
7ed397c8ca68
improve compatibility of null assignment (bug #31287)
John W. Eaton <jwe@octave.org>
parents:
17336
diff
changeset
|
419 %!error x(1, 1, []) = []; |
7ed397c8ca68
improve compatibility of null assignment (bug #31287)
John W. Eaton <jwe@octave.org>
parents:
17336
diff
changeset
|
420 |
7ed397c8ca68
improve compatibility of null assignment (bug #31287)
John W. Eaton <jwe@octave.org>
parents:
17336
diff
changeset
|
421 %!shared x, y |
7ed397c8ca68
improve compatibility of null assignment (bug #31287)
John W. Eaton <jwe@octave.org>
parents:
17336
diff
changeset
|
422 %! y = ones (2, 2); |
7ed397c8ca68
improve compatibility of null assignment (bug #31287)
John W. Eaton <jwe@octave.org>
parents:
17336
diff
changeset
|
423 %! x = ones (2, 2); |
7ed397c8ca68
improve compatibility of null assignment (bug #31287)
John W. Eaton <jwe@octave.org>
parents:
17336
diff
changeset
|
424 %! x(false, false, 1) = []; |
7ed397c8ca68
improve compatibility of null assignment (bug #31287)
John W. Eaton <jwe@octave.org>
parents:
17336
diff
changeset
|
425 %! assert (x, y); |
7ed397c8ca68
improve compatibility of null assignment (bug #31287)
John W. Eaton <jwe@octave.org>
parents:
17336
diff
changeset
|
426 |
7ed397c8ca68
improve compatibility of null assignment (bug #31287)
John W. Eaton <jwe@octave.org>
parents:
17336
diff
changeset
|
427 %!shared x, y |
7ed397c8ca68
improve compatibility of null assignment (bug #31287)
John W. Eaton <jwe@octave.org>
parents:
17336
diff
changeset
|
428 %! y = ones (2, 2); |
7ed397c8ca68
improve compatibility of null assignment (bug #31287)
John W. Eaton <jwe@octave.org>
parents:
17336
diff
changeset
|
429 %! x = ones (2, 2); |
7ed397c8ca68
improve compatibility of null assignment (bug #31287)
John W. Eaton <jwe@octave.org>
parents:
17336
diff
changeset
|
430 %! x(false, false, []) = []; |
7ed397c8ca68
improve compatibility of null assignment (bug #31287)
John W. Eaton <jwe@octave.org>
parents:
17336
diff
changeset
|
431 %! assert (x, y); |
7ed397c8ca68
improve compatibility of null assignment (bug #31287)
John W. Eaton <jwe@octave.org>
parents:
17336
diff
changeset
|
432 |
7ed397c8ca68
improve compatibility of null assignment (bug #31287)
John W. Eaton <jwe@octave.org>
parents:
17336
diff
changeset
|
433 %!shared x, y |
7ed397c8ca68
improve compatibility of null assignment (bug #31287)
John W. Eaton <jwe@octave.org>
parents:
17336
diff
changeset
|
434 %! y = ones (2, 2); |
7ed397c8ca68
improve compatibility of null assignment (bug #31287)
John W. Eaton <jwe@octave.org>
parents:
17336
diff
changeset
|
435 %! x = ones (2, 2); |
7ed397c8ca68
improve compatibility of null assignment (bug #31287)
John W. Eaton <jwe@octave.org>
parents:
17336
diff
changeset
|
436 %! x(false, false, [], false) = []; |
7ed397c8ca68
improve compatibility of null assignment (bug #31287)
John W. Eaton <jwe@octave.org>
parents:
17336
diff
changeset
|
437 %! assert (x, y); |
7ed397c8ca68
improve compatibility of null assignment (bug #31287)
John W. Eaton <jwe@octave.org>
parents:
17336
diff
changeset
|
438 |
7ed397c8ca68
improve compatibility of null assignment (bug #31287)
John W. Eaton <jwe@octave.org>
parents:
17336
diff
changeset
|
439 %!shared x, y |
7ed397c8ca68
improve compatibility of null assignment (bug #31287)
John W. Eaton <jwe@octave.org>
parents:
17336
diff
changeset
|
440 %! y = ones (2, 2); |
7ed397c8ca68
improve compatibility of null assignment (bug #31287)
John W. Eaton <jwe@octave.org>
parents:
17336
diff
changeset
|
441 %! x = ones (2, 2); |
7ed397c8ca68
improve compatibility of null assignment (bug #31287)
John W. Eaton <jwe@octave.org>
parents:
17336
diff
changeset
|
442 %! x(1, false, [], false) = []; |
7ed397c8ca68
improve compatibility of null assignment (bug #31287)
John W. Eaton <jwe@octave.org>
parents:
17336
diff
changeset
|
443 %! assert (x, y); |
7ed397c8ca68
improve compatibility of null assignment (bug #31287)
John W. Eaton <jwe@octave.org>
parents:
17336
diff
changeset
|
444 |
7ed397c8ca68
improve compatibility of null assignment (bug #31287)
John W. Eaton <jwe@octave.org>
parents:
17336
diff
changeset
|
445 %!shared x, y |
7ed397c8ca68
improve compatibility of null assignment (bug #31287)
John W. Eaton <jwe@octave.org>
parents:
17336
diff
changeset
|
446 %! y = ones (2, 2); |
7ed397c8ca68
improve compatibility of null assignment (bug #31287)
John W. Eaton <jwe@octave.org>
parents:
17336
diff
changeset
|
447 %! x = ones (2, 2); |
7ed397c8ca68
improve compatibility of null assignment (bug #31287)
John W. Eaton <jwe@octave.org>
parents:
17336
diff
changeset
|
448 %! x(:, false, 1) = []; |
7ed397c8ca68
improve compatibility of null assignment (bug #31287)
John W. Eaton <jwe@octave.org>
parents:
17336
diff
changeset
|
449 %! assert (x, y); |
7ed397c8ca68
improve compatibility of null assignment (bug #31287)
John W. Eaton <jwe@octave.org>
parents:
17336
diff
changeset
|
450 |
7ed397c8ca68
improve compatibility of null assignment (bug #31287)
John W. Eaton <jwe@octave.org>
parents:
17336
diff
changeset
|
451 %!test |
7ed397c8ca68
improve compatibility of null assignment (bug #31287)
John W. Eaton <jwe@octave.org>
parents:
17336
diff
changeset
|
452 %! y = ones (2, 2); |
7ed397c8ca68
improve compatibility of null assignment (bug #31287)
John W. Eaton <jwe@octave.org>
parents:
17336
diff
changeset
|
453 %! x = ones (2, 2); |
7ed397c8ca68
improve compatibility of null assignment (bug #31287)
John W. Eaton <jwe@octave.org>
parents:
17336
diff
changeset
|
454 %! x([]) = []; |
7ed397c8ca68
improve compatibility of null assignment (bug #31287)
John W. Eaton <jwe@octave.org>
parents:
17336
diff
changeset
|
455 %! assert (x, y); |
7ed397c8ca68
improve compatibility of null assignment (bug #31287)
John W. Eaton <jwe@octave.org>
parents:
17336
diff
changeset
|
456 |
7ed397c8ca68
improve compatibility of null assignment (bug #31287)
John W. Eaton <jwe@octave.org>
parents:
17336
diff
changeset
|
457 %!test |
7ed397c8ca68
improve compatibility of null assignment (bug #31287)
John W. Eaton <jwe@octave.org>
parents:
17336
diff
changeset
|
458 %! y = sparse (ones (2, 2)); |
7ed397c8ca68
improve compatibility of null assignment (bug #31287)
John W. Eaton <jwe@octave.org>
parents:
17336
diff
changeset
|
459 %! x = sparse (ones (2, 2)); |
7ed397c8ca68
improve compatibility of null assignment (bug #31287)
John W. Eaton <jwe@octave.org>
parents:
17336
diff
changeset
|
460 %! x([]) = []; |
7ed397c8ca68
improve compatibility of null assignment (bug #31287)
John W. Eaton <jwe@octave.org>
parents:
17336
diff
changeset
|
461 %! assert (x, y); |
7ed397c8ca68
improve compatibility of null assignment (bug #31287)
John W. Eaton <jwe@octave.org>
parents:
17336
diff
changeset
|
462 |
7ed397c8ca68
improve compatibility of null assignment (bug #31287)
John W. Eaton <jwe@octave.org>
parents:
17336
diff
changeset
|
463 %!test |
7ed397c8ca68
improve compatibility of null assignment (bug #31287)
John W. Eaton <jwe@octave.org>
parents:
17336
diff
changeset
|
464 %! y = []; |
7ed397c8ca68
improve compatibility of null assignment (bug #31287)
John W. Eaton <jwe@octave.org>
parents:
17336
diff
changeset
|
465 %! x = ones (2, 2); |
7ed397c8ca68
improve compatibility of null assignment (bug #31287)
John W. Eaton <jwe@octave.org>
parents:
17336
diff
changeset
|
466 %! x(:) = []; |
7ed397c8ca68
improve compatibility of null assignment (bug #31287)
John W. Eaton <jwe@octave.org>
parents:
17336
diff
changeset
|
467 %! assert (x, y); |
7ed397c8ca68
improve compatibility of null assignment (bug #31287)
John W. Eaton <jwe@octave.org>
parents:
17336
diff
changeset
|
468 |
7ed397c8ca68
improve compatibility of null assignment (bug #31287)
John W. Eaton <jwe@octave.org>
parents:
17336
diff
changeset
|
469 %!test |
7ed397c8ca68
improve compatibility of null assignment (bug #31287)
John W. Eaton <jwe@octave.org>
parents:
17336
diff
changeset
|
470 %! y = sparse ([]); |
7ed397c8ca68
improve compatibility of null assignment (bug #31287)
John W. Eaton <jwe@octave.org>
parents:
17336
diff
changeset
|
471 %! x = sparse (ones (2, 2)); |
7ed397c8ca68
improve compatibility of null assignment (bug #31287)
John W. Eaton <jwe@octave.org>
parents:
17336
diff
changeset
|
472 %! x(:) = []; |
7ed397c8ca68
improve compatibility of null assignment (bug #31287)
John W. Eaton <jwe@octave.org>
parents:
17336
diff
changeset
|
473 %! assert (x, y); |
7ed397c8ca68
improve compatibility of null assignment (bug #31287)
John W. Eaton <jwe@octave.org>
parents:
17336
diff
changeset
|
474 |
7ed397c8ca68
improve compatibility of null assignment (bug #31287)
John W. Eaton <jwe@octave.org>
parents:
17336
diff
changeset
|
475 %!test |
7ed397c8ca68
improve compatibility of null assignment (bug #31287)
John W. Eaton <jwe@octave.org>
parents:
17336
diff
changeset
|
476 %! y = ones (2, 2); |
7ed397c8ca68
improve compatibility of null assignment (bug #31287)
John W. Eaton <jwe@octave.org>
parents:
17336
diff
changeset
|
477 %! x = ones (2, 2); |
7ed397c8ca68
improve compatibility of null assignment (bug #31287)
John W. Eaton <jwe@octave.org>
parents:
17336
diff
changeset
|
478 %! x(false) = []; |
7ed397c8ca68
improve compatibility of null assignment (bug #31287)
John W. Eaton <jwe@octave.org>
parents:
17336
diff
changeset
|
479 %! assert (x, y); |
7ed397c8ca68
improve compatibility of null assignment (bug #31287)
John W. Eaton <jwe@octave.org>
parents:
17336
diff
changeset
|
480 |
7ed397c8ca68
improve compatibility of null assignment (bug #31287)
John W. Eaton <jwe@octave.org>
parents:
17336
diff
changeset
|
481 %!test |
7ed397c8ca68
improve compatibility of null assignment (bug #31287)
John W. Eaton <jwe@octave.org>
parents:
17336
diff
changeset
|
482 %! y = sparse (ones (2, 2)); |
7ed397c8ca68
improve compatibility of null assignment (bug #31287)
John W. Eaton <jwe@octave.org>
parents:
17336
diff
changeset
|
483 %! x = sparse (ones (2, 2)); |
7ed397c8ca68
improve compatibility of null assignment (bug #31287)
John W. Eaton <jwe@octave.org>
parents:
17336
diff
changeset
|
484 %! x(false) = []; |
7ed397c8ca68
improve compatibility of null assignment (bug #31287)
John W. Eaton <jwe@octave.org>
parents:
17336
diff
changeset
|
485 %! assert (x, y); |
7ed397c8ca68
improve compatibility of null assignment (bug #31287)
John W. Eaton <jwe@octave.org>
parents:
17336
diff
changeset
|
486 |
7ed397c8ca68
improve compatibility of null assignment (bug #31287)
John W. Eaton <jwe@octave.org>
parents:
17336
diff
changeset
|
487 %!test |
7ed397c8ca68
improve compatibility of null assignment (bug #31287)
John W. Eaton <jwe@octave.org>
parents:
17336
diff
changeset
|
488 %! y = ones (2, 2); |
7ed397c8ca68
improve compatibility of null assignment (bug #31287)
John W. Eaton <jwe@octave.org>
parents:
17336
diff
changeset
|
489 %! x = ones (2, 2); |
7ed397c8ca68
improve compatibility of null assignment (bug #31287)
John W. Eaton <jwe@octave.org>
parents:
17336
diff
changeset
|
490 %! x([], false) = []; |
7ed397c8ca68
improve compatibility of null assignment (bug #31287)
John W. Eaton <jwe@octave.org>
parents:
17336
diff
changeset
|
491 %! assert (x, y); |
7ed397c8ca68
improve compatibility of null assignment (bug #31287)
John W. Eaton <jwe@octave.org>
parents:
17336
diff
changeset
|
492 |
7ed397c8ca68
improve compatibility of null assignment (bug #31287)
John W. Eaton <jwe@octave.org>
parents:
17336
diff
changeset
|
493 %!test |
7ed397c8ca68
improve compatibility of null assignment (bug #31287)
John W. Eaton <jwe@octave.org>
parents:
17336
diff
changeset
|
494 %! y = sparse (ones (2, 2)); |
7ed397c8ca68
improve compatibility of null assignment (bug #31287)
John W. Eaton <jwe@octave.org>
parents:
17336
diff
changeset
|
495 %! x = sparse (ones (2, 2)); |
7ed397c8ca68
improve compatibility of null assignment (bug #31287)
John W. Eaton <jwe@octave.org>
parents:
17336
diff
changeset
|
496 %! x([], false) = []; |
7ed397c8ca68
improve compatibility of null assignment (bug #31287)
John W. Eaton <jwe@octave.org>
parents:
17336
diff
changeset
|
497 %! assert (x, y); |
7ed397c8ca68
improve compatibility of null assignment (bug #31287)
John W. Eaton <jwe@octave.org>
parents:
17336
diff
changeset
|
498 |
7ed397c8ca68
improve compatibility of null assignment (bug #31287)
John W. Eaton <jwe@octave.org>
parents:
17336
diff
changeset
|
499 %!test |
7ed397c8ca68
improve compatibility of null assignment (bug #31287)
John W. Eaton <jwe@octave.org>
parents:
17336
diff
changeset
|
500 %! y = ones (2, 2); |
7ed397c8ca68
improve compatibility of null assignment (bug #31287)
John W. Eaton <jwe@octave.org>
parents:
17336
diff
changeset
|
501 %! x = ones (2, 2); |
7ed397c8ca68
improve compatibility of null assignment (bug #31287)
John W. Eaton <jwe@octave.org>
parents:
17336
diff
changeset
|
502 %! x([], false, :) = []; |
7ed397c8ca68
improve compatibility of null assignment (bug #31287)
John W. Eaton <jwe@octave.org>
parents:
17336
diff
changeset
|
503 %! assert (x, y); |