Mercurial > octave
annotate test/single-index.tst @ 31202:434b5a1b9498
isequal.m: Add ability to compare Java objects (bug #62930)
* isequal.m: Add elseif clause to detect Java objects and use built-in Java
"equals" method for comparison. Add BIST test for Java object comparison.
author | Rik <rik@octave.org> |
---|---|
date | Thu, 25 Aug 2022 15:35:25 -0700 |
parents | 796f54d4ddbf |
children | 597f3ee61a48 |
rev | line source |
---|---|
27923
bd51beb6205e
update formatting of copyright notices
John W. Eaton <jwe@octave.org>
parents:
27919
diff
changeset
|
1 ######################################################################## |
bd51beb6205e
update formatting of copyright notices
John W. Eaton <jwe@octave.org>
parents:
27919
diff
changeset
|
2 ## |
30564
796f54d4ddbf
update Octave Project Developers copyright for the new year
John W. Eaton <jwe@octave.org>
parents:
29358
diff
changeset
|
3 ## Copyright (C) 2017-2022 The Octave Project Developers |
27918
b442ec6dda5c
use centralized file for copyright info for individual contributors
John W. Eaton <jwe@octave.org>
parents:
26376
diff
changeset
|
4 ## |
27923
bd51beb6205e
update formatting of copyright notices
John W. Eaton <jwe@octave.org>
parents:
27919
diff
changeset
|
5 ## See the file COPYRIGHT.md in the top-level directory of this |
bd51beb6205e
update formatting of copyright notices
John W. Eaton <jwe@octave.org>
parents:
27919
diff
changeset
|
6 ## distribution or <https://octave.org/copyright/>. |
23386
f1ea44e92df8
improve compatibility for single index indexing (bug #50776)
John W. Eaton <jwe@octave.org>
parents:
diff
changeset
|
7 ## |
f1ea44e92df8
improve compatibility for single index indexing (bug #50776)
John W. Eaton <jwe@octave.org>
parents:
diff
changeset
|
8 ## This file is part of Octave. |
f1ea44e92df8
improve compatibility for single index indexing (bug #50776)
John W. Eaton <jwe@octave.org>
parents:
diff
changeset
|
9 ## |
24534
194eb4bd202b
maint: Update punctuation for GPL v3 license text.
Rik <rik@octave.org>
parents:
23386
diff
changeset
|
10 ## Octave is free software: you can redistribute it and/or modify it |
23386
f1ea44e92df8
improve compatibility for single index indexing (bug #50776)
John W. Eaton <jwe@octave.org>
parents:
diff
changeset
|
11 ## under the terms of the GNU General Public License as published by |
24534
194eb4bd202b
maint: Update punctuation for GPL v3 license text.
Rik <rik@octave.org>
parents:
23386
diff
changeset
|
12 ## the Free Software Foundation, either version 3 of the License, or |
23386
f1ea44e92df8
improve compatibility for single index indexing (bug #50776)
John W. Eaton <jwe@octave.org>
parents:
diff
changeset
|
13 ## (at your option) any later version. |
f1ea44e92df8
improve compatibility for single index indexing (bug #50776)
John W. Eaton <jwe@octave.org>
parents:
diff
changeset
|
14 ## |
f1ea44e92df8
improve compatibility for single index indexing (bug #50776)
John W. Eaton <jwe@octave.org>
parents:
diff
changeset
|
15 ## Octave is distributed in the hope that it will be useful, but |
f1ea44e92df8
improve compatibility for single index indexing (bug #50776)
John W. Eaton <jwe@octave.org>
parents:
diff
changeset
|
16 ## WITHOUT ANY WARRANTY; without even the implied warranty of |
f1ea44e92df8
improve compatibility for single index indexing (bug #50776)
John W. Eaton <jwe@octave.org>
parents:
diff
changeset
|
17 ## MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the |
f1ea44e92df8
improve compatibility for single index indexing (bug #50776)
John W. Eaton <jwe@octave.org>
parents:
diff
changeset
|
18 ## GNU General Public License for more details. |
f1ea44e92df8
improve compatibility for single index indexing (bug #50776)
John W. Eaton <jwe@octave.org>
parents:
diff
changeset
|
19 ## |
f1ea44e92df8
improve compatibility for single index indexing (bug #50776)
John W. Eaton <jwe@octave.org>
parents:
diff
changeset
|
20 ## You should have received a copy of the GNU General Public License |
f1ea44e92df8
improve compatibility for single index indexing (bug #50776)
John W. Eaton <jwe@octave.org>
parents:
diff
changeset
|
21 ## along with Octave; see the file COPYING. If not, see |
24534
194eb4bd202b
maint: Update punctuation for GPL v3 license text.
Rik <rik@octave.org>
parents:
23386
diff
changeset
|
22 ## <https://www.gnu.org/licenses/>. |
27923
bd51beb6205e
update formatting of copyright notices
John W. Eaton <jwe@octave.org>
parents:
27919
diff
changeset
|
23 ## |
bd51beb6205e
update formatting of copyright notices
John W. Eaton <jwe@octave.org>
parents:
27919
diff
changeset
|
24 ######################################################################## |
23386
f1ea44e92df8
improve compatibility for single index indexing (bug #50776)
John W. Eaton <jwe@octave.org>
parents:
diff
changeset
|
25 |
f1ea44e92df8
improve compatibility for single index indexing (bug #50776)
John W. Eaton <jwe@octave.org>
parents:
diff
changeset
|
26 %!shared rv,cv,ndv,wm,tm,nd,lrv,lcv,lwm,ltm,lndv1,lndv2,lnd1,lnd2,rrv,rcv,rndv1,rndv2 |
f1ea44e92df8
improve compatibility for single index indexing (bug #50776)
John W. Eaton <jwe@octave.org>
parents:
diff
changeset
|
27 %! rv = [1,2,3,4,5,6,7,8,9,10,11,12]; |
f1ea44e92df8
improve compatibility for single index indexing (bug #50776)
John W. Eaton <jwe@octave.org>
parents:
diff
changeset
|
28 %! cv = rv'; |
f1ea44e92df8
improve compatibility for single index indexing (bug #50776)
John W. Eaton <jwe@octave.org>
parents:
diff
changeset
|
29 %! ndv = reshape (rv, 1, 1, 12); |
f1ea44e92df8
improve compatibility for single index indexing (bug #50776)
John W. Eaton <jwe@octave.org>
parents:
diff
changeset
|
30 %! wm = reshape (rv, 2, 6); |
f1ea44e92df8
improve compatibility for single index indexing (bug #50776)
John W. Eaton <jwe@octave.org>
parents:
diff
changeset
|
31 %! tm = reshape (rv, 6, 2); |
f1ea44e92df8
improve compatibility for single index indexing (bug #50776)
John W. Eaton <jwe@octave.org>
parents:
diff
changeset
|
32 %! nd = reshape (rv, 2, 2, 3); |
f1ea44e92df8
improve compatibility for single index indexing (bug #50776)
John W. Eaton <jwe@octave.org>
parents:
diff
changeset
|
33 %! lrv = logical ([1,0,0,1,1,0,0,1,1,0,0,1]); |
f1ea44e92df8
improve compatibility for single index indexing (bug #50776)
John W. Eaton <jwe@octave.org>
parents:
diff
changeset
|
34 %! lcv = lrv'; |
f1ea44e92df8
improve compatibility for single index indexing (bug #50776)
John W. Eaton <jwe@octave.org>
parents:
diff
changeset
|
35 %! lwm = reshape (lrv, 2, 6); |
f1ea44e92df8
improve compatibility for single index indexing (bug #50776)
John W. Eaton <jwe@octave.org>
parents:
diff
changeset
|
36 %! ltm = reshape (lrv, 6, 2); |
f1ea44e92df8
improve compatibility for single index indexing (bug #50776)
John W. Eaton <jwe@octave.org>
parents:
diff
changeset
|
37 %! lndv1 = reshape (lrv, 1, 1, 12); |
f1ea44e92df8
improve compatibility for single index indexing (bug #50776)
John W. Eaton <jwe@octave.org>
parents:
diff
changeset
|
38 %! lndv2 = reshape (lrv, 1, 1, 1, 12); |
f1ea44e92df8
improve compatibility for single index indexing (bug #50776)
John W. Eaton <jwe@octave.org>
parents:
diff
changeset
|
39 %! lnd1 = reshape (lrv, 2, 2, 3); |
f1ea44e92df8
improve compatibility for single index indexing (bug #50776)
John W. Eaton <jwe@octave.org>
parents:
diff
changeset
|
40 %! lnd2 = reshape (lrv, 2, 3, 2); |
f1ea44e92df8
improve compatibility for single index indexing (bug #50776)
John W. Eaton <jwe@octave.org>
parents:
diff
changeset
|
41 %! rrv = [1,4,5,8,9,12]; |
f1ea44e92df8
improve compatibility for single index indexing (bug #50776)
John W. Eaton <jwe@octave.org>
parents:
diff
changeset
|
42 %! rcv = rrv'; |
f1ea44e92df8
improve compatibility for single index indexing (bug #50776)
John W. Eaton <jwe@octave.org>
parents:
diff
changeset
|
43 %! rndv1 = reshape (rrv, 1, 1, 6); |
f1ea44e92df8
improve compatibility for single index indexing (bug #50776)
John W. Eaton <jwe@octave.org>
parents:
diff
changeset
|
44 %! rndv2 = reshape (rrv, 1, 1, 1, 6); |
f1ea44e92df8
improve compatibility for single index indexing (bug #50776)
John W. Eaton <jwe@octave.org>
parents:
diff
changeset
|
45 %!assert (rv(lrv), rrv) |
f1ea44e92df8
improve compatibility for single index indexing (bug #50776)
John W. Eaton <jwe@octave.org>
parents:
diff
changeset
|
46 %!assert (rv(lcv), rrv) |
f1ea44e92df8
improve compatibility for single index indexing (bug #50776)
John W. Eaton <jwe@octave.org>
parents:
diff
changeset
|
47 %!assert (rv(lwm), rrv) |
f1ea44e92df8
improve compatibility for single index indexing (bug #50776)
John W. Eaton <jwe@octave.org>
parents:
diff
changeset
|
48 %!assert (rv(ltm), rrv) |
f1ea44e92df8
improve compatibility for single index indexing (bug #50776)
John W. Eaton <jwe@octave.org>
parents:
diff
changeset
|
49 %!assert (rv(lndv1), rrv) |
f1ea44e92df8
improve compatibility for single index indexing (bug #50776)
John W. Eaton <jwe@octave.org>
parents:
diff
changeset
|
50 %!assert (rv(lndv2), rrv) |
f1ea44e92df8
improve compatibility for single index indexing (bug #50776)
John W. Eaton <jwe@octave.org>
parents:
diff
changeset
|
51 %!assert (rv(lnd1), rrv) |
f1ea44e92df8
improve compatibility for single index indexing (bug #50776)
John W. Eaton <jwe@octave.org>
parents:
diff
changeset
|
52 %!assert (rv(lnd2), rrv) |
f1ea44e92df8
improve compatibility for single index indexing (bug #50776)
John W. Eaton <jwe@octave.org>
parents:
diff
changeset
|
53 %!assert (cv(lrv), rcv) |
f1ea44e92df8
improve compatibility for single index indexing (bug #50776)
John W. Eaton <jwe@octave.org>
parents:
diff
changeset
|
54 %!assert (cv(lcv), rcv) |
f1ea44e92df8
improve compatibility for single index indexing (bug #50776)
John W. Eaton <jwe@octave.org>
parents:
diff
changeset
|
55 %!assert (cv(lwm), rcv) |
f1ea44e92df8
improve compatibility for single index indexing (bug #50776)
John W. Eaton <jwe@octave.org>
parents:
diff
changeset
|
56 %!assert (cv(ltm), rcv) |
f1ea44e92df8
improve compatibility for single index indexing (bug #50776)
John W. Eaton <jwe@octave.org>
parents:
diff
changeset
|
57 %!assert (cv(lndv1), rcv) |
f1ea44e92df8
improve compatibility for single index indexing (bug #50776)
John W. Eaton <jwe@octave.org>
parents:
diff
changeset
|
58 %!assert (cv(lndv2), rcv) |
f1ea44e92df8
improve compatibility for single index indexing (bug #50776)
John W. Eaton <jwe@octave.org>
parents:
diff
changeset
|
59 %!assert (cv(lnd1), rcv) |
f1ea44e92df8
improve compatibility for single index indexing (bug #50776)
John W. Eaton <jwe@octave.org>
parents:
diff
changeset
|
60 %!assert (cv(lnd2), rcv) |
f1ea44e92df8
improve compatibility for single index indexing (bug #50776)
John W. Eaton <jwe@octave.org>
parents:
diff
changeset
|
61 %!assert (ndv(lrv), rndv1) |
f1ea44e92df8
improve compatibility for single index indexing (bug #50776)
John W. Eaton <jwe@octave.org>
parents:
diff
changeset
|
62 %!assert (ndv(lcv), rndv1) |
f1ea44e92df8
improve compatibility for single index indexing (bug #50776)
John W. Eaton <jwe@octave.org>
parents:
diff
changeset
|
63 %!assert (ndv(lwm), rndv1) |
f1ea44e92df8
improve compatibility for single index indexing (bug #50776)
John W. Eaton <jwe@octave.org>
parents:
diff
changeset
|
64 %!assert (ndv(ltm), rndv1) |
f1ea44e92df8
improve compatibility for single index indexing (bug #50776)
John W. Eaton <jwe@octave.org>
parents:
diff
changeset
|
65 %!assert (ndv(lndv1), rndv1) |
f1ea44e92df8
improve compatibility for single index indexing (bug #50776)
John W. Eaton <jwe@octave.org>
parents:
diff
changeset
|
66 %!assert (ndv(lndv2), rndv1) |
f1ea44e92df8
improve compatibility for single index indexing (bug #50776)
John W. Eaton <jwe@octave.org>
parents:
diff
changeset
|
67 %!assert (ndv(lnd1), rndv1) |
f1ea44e92df8
improve compatibility for single index indexing (bug #50776)
John W. Eaton <jwe@octave.org>
parents:
diff
changeset
|
68 %!assert (ndv(lnd2), rndv1) |
f1ea44e92df8
improve compatibility for single index indexing (bug #50776)
John W. Eaton <jwe@octave.org>
parents:
diff
changeset
|
69 %!assert (wm(lrv), rrv) |
f1ea44e92df8
improve compatibility for single index indexing (bug #50776)
John W. Eaton <jwe@octave.org>
parents:
diff
changeset
|
70 %!assert (wm(lcv), rcv) |
f1ea44e92df8
improve compatibility for single index indexing (bug #50776)
John W. Eaton <jwe@octave.org>
parents:
diff
changeset
|
71 %!assert (wm(lwm), rcv) |
f1ea44e92df8
improve compatibility for single index indexing (bug #50776)
John W. Eaton <jwe@octave.org>
parents:
diff
changeset
|
72 %!assert (wm(ltm), rcv) |
f1ea44e92df8
improve compatibility for single index indexing (bug #50776)
John W. Eaton <jwe@octave.org>
parents:
diff
changeset
|
73 %!assert (wm(lndv1), rndv1) |
f1ea44e92df8
improve compatibility for single index indexing (bug #50776)
John W. Eaton <jwe@octave.org>
parents:
diff
changeset
|
74 %!assert (wm(lndv2), rndv2) |
f1ea44e92df8
improve compatibility for single index indexing (bug #50776)
John W. Eaton <jwe@octave.org>
parents:
diff
changeset
|
75 %!assert (wm(lnd1), rcv) |
f1ea44e92df8
improve compatibility for single index indexing (bug #50776)
John W. Eaton <jwe@octave.org>
parents:
diff
changeset
|
76 %!assert (wm(lnd2), rcv) |
f1ea44e92df8
improve compatibility for single index indexing (bug #50776)
John W. Eaton <jwe@octave.org>
parents:
diff
changeset
|
77 %!assert (tm(lrv), rrv) |
f1ea44e92df8
improve compatibility for single index indexing (bug #50776)
John W. Eaton <jwe@octave.org>
parents:
diff
changeset
|
78 %!assert (tm(lcv), rcv) |
f1ea44e92df8
improve compatibility for single index indexing (bug #50776)
John W. Eaton <jwe@octave.org>
parents:
diff
changeset
|
79 %!assert (tm(lwm), rcv) |
f1ea44e92df8
improve compatibility for single index indexing (bug #50776)
John W. Eaton <jwe@octave.org>
parents:
diff
changeset
|
80 %!assert (tm(ltm), rcv) |
f1ea44e92df8
improve compatibility for single index indexing (bug #50776)
John W. Eaton <jwe@octave.org>
parents:
diff
changeset
|
81 %!assert (tm(lndv1), rndv1) |
f1ea44e92df8
improve compatibility for single index indexing (bug #50776)
John W. Eaton <jwe@octave.org>
parents:
diff
changeset
|
82 %!assert (tm(lndv2), rndv2) |
f1ea44e92df8
improve compatibility for single index indexing (bug #50776)
John W. Eaton <jwe@octave.org>
parents:
diff
changeset
|
83 %!assert (tm(lnd1), rcv) |
f1ea44e92df8
improve compatibility for single index indexing (bug #50776)
John W. Eaton <jwe@octave.org>
parents:
diff
changeset
|
84 %!assert (tm(lnd2), rcv) |
f1ea44e92df8
improve compatibility for single index indexing (bug #50776)
John W. Eaton <jwe@octave.org>
parents:
diff
changeset
|
85 %!assert (nd(lrv), rrv) |
f1ea44e92df8
improve compatibility for single index indexing (bug #50776)
John W. Eaton <jwe@octave.org>
parents:
diff
changeset
|
86 %!assert (nd(lcv), rcv) |
f1ea44e92df8
improve compatibility for single index indexing (bug #50776)
John W. Eaton <jwe@octave.org>
parents:
diff
changeset
|
87 %!assert (nd(lwm), rcv) |
f1ea44e92df8
improve compatibility for single index indexing (bug #50776)
John W. Eaton <jwe@octave.org>
parents:
diff
changeset
|
88 %!assert (nd(ltm), rcv) |
f1ea44e92df8
improve compatibility for single index indexing (bug #50776)
John W. Eaton <jwe@octave.org>
parents:
diff
changeset
|
89 %!assert (nd(lndv1), rndv1) |
f1ea44e92df8
improve compatibility for single index indexing (bug #50776)
John W. Eaton <jwe@octave.org>
parents:
diff
changeset
|
90 %!assert (nd(lndv2), rndv2) |
f1ea44e92df8
improve compatibility for single index indexing (bug #50776)
John W. Eaton <jwe@octave.org>
parents:
diff
changeset
|
91 %!assert (nd(lnd1), rcv) |
f1ea44e92df8
improve compatibility for single index indexing (bug #50776)
John W. Eaton <jwe@octave.org>
parents:
diff
changeset
|
92 %!assert (nd(lnd2), rcv) |
f1ea44e92df8
improve compatibility for single index indexing (bug #50776)
John W. Eaton <jwe@octave.org>
parents:
diff
changeset
|
93 |
f1ea44e92df8
improve compatibility for single index indexing (bug #50776)
John W. Eaton <jwe@octave.org>
parents:
diff
changeset
|
94 %!shared rv,cv,ndv,wm,tm,nd,lrv,lcv,lwm,ltm,lndv1,lndv2,lnd1,lnd2,rrv,rcv,rndv1,rndv2 |
f1ea44e92df8
improve compatibility for single index indexing (bug #50776)
John W. Eaton <jwe@octave.org>
parents:
diff
changeset
|
95 %! rv = [1,2,3,4,5,6,7,8,9,10,11,12]; |
f1ea44e92df8
improve compatibility for single index indexing (bug #50776)
John W. Eaton <jwe@octave.org>
parents:
diff
changeset
|
96 %! cv = rv'; |
f1ea44e92df8
improve compatibility for single index indexing (bug #50776)
John W. Eaton <jwe@octave.org>
parents:
diff
changeset
|
97 %! ndv = reshape (rv, 1, 1, 12); |
f1ea44e92df8
improve compatibility for single index indexing (bug #50776)
John W. Eaton <jwe@octave.org>
parents:
diff
changeset
|
98 %! wm = reshape (rv, 2, 6); |
f1ea44e92df8
improve compatibility for single index indexing (bug #50776)
John W. Eaton <jwe@octave.org>
parents:
diff
changeset
|
99 %! tm = reshape (rv, 6, 2); |
f1ea44e92df8
improve compatibility for single index indexing (bug #50776)
John W. Eaton <jwe@octave.org>
parents:
diff
changeset
|
100 %! nd = reshape (rv, 2, 2, 3); |
f1ea44e92df8
improve compatibility for single index indexing (bug #50776)
John W. Eaton <jwe@octave.org>
parents:
diff
changeset
|
101 %! lrv = logical ([1,1,1,1,1,1,1,1,1,1,1,1]); |
f1ea44e92df8
improve compatibility for single index indexing (bug #50776)
John W. Eaton <jwe@octave.org>
parents:
diff
changeset
|
102 %! lcv = lrv'; |
f1ea44e92df8
improve compatibility for single index indexing (bug #50776)
John W. Eaton <jwe@octave.org>
parents:
diff
changeset
|
103 %! lwm = reshape (lrv, 2, 6); |
f1ea44e92df8
improve compatibility for single index indexing (bug #50776)
John W. Eaton <jwe@octave.org>
parents:
diff
changeset
|
104 %! ltm = reshape (lrv, 6, 2); |
f1ea44e92df8
improve compatibility for single index indexing (bug #50776)
John W. Eaton <jwe@octave.org>
parents:
diff
changeset
|
105 %! lndv1 = reshape (lrv, 1, 1, 12); |
f1ea44e92df8
improve compatibility for single index indexing (bug #50776)
John W. Eaton <jwe@octave.org>
parents:
diff
changeset
|
106 %! lndv2 = reshape (lrv, 1, 1, 1, 12); |
f1ea44e92df8
improve compatibility for single index indexing (bug #50776)
John W. Eaton <jwe@octave.org>
parents:
diff
changeset
|
107 %! lnd1 = reshape (lrv, 2, 2, 3); |
f1ea44e92df8
improve compatibility for single index indexing (bug #50776)
John W. Eaton <jwe@octave.org>
parents:
diff
changeset
|
108 %! lnd2 = reshape (lrv, 2, 3, 2); |
f1ea44e92df8
improve compatibility for single index indexing (bug #50776)
John W. Eaton <jwe@octave.org>
parents:
diff
changeset
|
109 %! rrv = [1,2,3,4,5,6,7,8,9,10,11,12]; |
f1ea44e92df8
improve compatibility for single index indexing (bug #50776)
John W. Eaton <jwe@octave.org>
parents:
diff
changeset
|
110 %! rcv = rrv'; |
f1ea44e92df8
improve compatibility for single index indexing (bug #50776)
John W. Eaton <jwe@octave.org>
parents:
diff
changeset
|
111 %! rndv1 = reshape (rrv, 1, 1, 12); |
f1ea44e92df8
improve compatibility for single index indexing (bug #50776)
John W. Eaton <jwe@octave.org>
parents:
diff
changeset
|
112 %! rndv2 = reshape (rrv, 1, 1, 1, 12); |
f1ea44e92df8
improve compatibility for single index indexing (bug #50776)
John W. Eaton <jwe@octave.org>
parents:
diff
changeset
|
113 %!assert (rv(lrv), rrv) |
f1ea44e92df8
improve compatibility for single index indexing (bug #50776)
John W. Eaton <jwe@octave.org>
parents:
diff
changeset
|
114 %!assert (rv(lcv), rrv) |
f1ea44e92df8
improve compatibility for single index indexing (bug #50776)
John W. Eaton <jwe@octave.org>
parents:
diff
changeset
|
115 %!assert (rv(lwm), rrv) |
f1ea44e92df8
improve compatibility for single index indexing (bug #50776)
John W. Eaton <jwe@octave.org>
parents:
diff
changeset
|
116 %!assert (rv(ltm), rrv) |
f1ea44e92df8
improve compatibility for single index indexing (bug #50776)
John W. Eaton <jwe@octave.org>
parents:
diff
changeset
|
117 %!assert (rv(lndv1), rrv) |
f1ea44e92df8
improve compatibility for single index indexing (bug #50776)
John W. Eaton <jwe@octave.org>
parents:
diff
changeset
|
118 %!assert (rv(lndv2), rrv) |
f1ea44e92df8
improve compatibility for single index indexing (bug #50776)
John W. Eaton <jwe@octave.org>
parents:
diff
changeset
|
119 %!assert (rv(lnd1), rrv) |
f1ea44e92df8
improve compatibility for single index indexing (bug #50776)
John W. Eaton <jwe@octave.org>
parents:
diff
changeset
|
120 %!assert (rv(lnd2), rrv) |
f1ea44e92df8
improve compatibility for single index indexing (bug #50776)
John W. Eaton <jwe@octave.org>
parents:
diff
changeset
|
121 %!assert (cv(lrv), rcv) |
f1ea44e92df8
improve compatibility for single index indexing (bug #50776)
John W. Eaton <jwe@octave.org>
parents:
diff
changeset
|
122 %!assert (cv(lcv), rcv) |
f1ea44e92df8
improve compatibility for single index indexing (bug #50776)
John W. Eaton <jwe@octave.org>
parents:
diff
changeset
|
123 %!assert (cv(lwm), rcv) |
f1ea44e92df8
improve compatibility for single index indexing (bug #50776)
John W. Eaton <jwe@octave.org>
parents:
diff
changeset
|
124 %!assert (cv(ltm), rcv) |
f1ea44e92df8
improve compatibility for single index indexing (bug #50776)
John W. Eaton <jwe@octave.org>
parents:
diff
changeset
|
125 %!assert (cv(lndv1), rcv) |
f1ea44e92df8
improve compatibility for single index indexing (bug #50776)
John W. Eaton <jwe@octave.org>
parents:
diff
changeset
|
126 %!assert (cv(lndv2), rcv) |
f1ea44e92df8
improve compatibility for single index indexing (bug #50776)
John W. Eaton <jwe@octave.org>
parents:
diff
changeset
|
127 %!assert (cv(lnd1), rcv) |
f1ea44e92df8
improve compatibility for single index indexing (bug #50776)
John W. Eaton <jwe@octave.org>
parents:
diff
changeset
|
128 %!assert (cv(lnd2), rcv) |
f1ea44e92df8
improve compatibility for single index indexing (bug #50776)
John W. Eaton <jwe@octave.org>
parents:
diff
changeset
|
129 %!assert (ndv(lrv), rndv1) |
f1ea44e92df8
improve compatibility for single index indexing (bug #50776)
John W. Eaton <jwe@octave.org>
parents:
diff
changeset
|
130 %!assert (ndv(lcv), rndv1) |
f1ea44e92df8
improve compatibility for single index indexing (bug #50776)
John W. Eaton <jwe@octave.org>
parents:
diff
changeset
|
131 %!assert (ndv(lwm), rndv1) |
f1ea44e92df8
improve compatibility for single index indexing (bug #50776)
John W. Eaton <jwe@octave.org>
parents:
diff
changeset
|
132 %!assert (ndv(ltm), rndv1) |
f1ea44e92df8
improve compatibility for single index indexing (bug #50776)
John W. Eaton <jwe@octave.org>
parents:
diff
changeset
|
133 %!assert (ndv(lndv1), rndv1) |
f1ea44e92df8
improve compatibility for single index indexing (bug #50776)
John W. Eaton <jwe@octave.org>
parents:
diff
changeset
|
134 %!assert (ndv(lndv2), rndv1) |
f1ea44e92df8
improve compatibility for single index indexing (bug #50776)
John W. Eaton <jwe@octave.org>
parents:
diff
changeset
|
135 %!assert (ndv(lnd1), rndv1) |
f1ea44e92df8
improve compatibility for single index indexing (bug #50776)
John W. Eaton <jwe@octave.org>
parents:
diff
changeset
|
136 %!assert (ndv(lnd2), rndv1) |
f1ea44e92df8
improve compatibility for single index indexing (bug #50776)
John W. Eaton <jwe@octave.org>
parents:
diff
changeset
|
137 %!assert (wm(lrv), rrv) |
f1ea44e92df8
improve compatibility for single index indexing (bug #50776)
John W. Eaton <jwe@octave.org>
parents:
diff
changeset
|
138 %!assert (wm(lcv), rcv) |
f1ea44e92df8
improve compatibility for single index indexing (bug #50776)
John W. Eaton <jwe@octave.org>
parents:
diff
changeset
|
139 %!assert (wm(lwm), rcv) |
f1ea44e92df8
improve compatibility for single index indexing (bug #50776)
John W. Eaton <jwe@octave.org>
parents:
diff
changeset
|
140 %!assert (wm(ltm), rcv) |
f1ea44e92df8
improve compatibility for single index indexing (bug #50776)
John W. Eaton <jwe@octave.org>
parents:
diff
changeset
|
141 %!assert (wm(lndv1), rndv1) |
f1ea44e92df8
improve compatibility for single index indexing (bug #50776)
John W. Eaton <jwe@octave.org>
parents:
diff
changeset
|
142 %!assert (wm(lndv2), rndv2) |
f1ea44e92df8
improve compatibility for single index indexing (bug #50776)
John W. Eaton <jwe@octave.org>
parents:
diff
changeset
|
143 %!assert (wm(lnd1), rcv) |
f1ea44e92df8
improve compatibility for single index indexing (bug #50776)
John W. Eaton <jwe@octave.org>
parents:
diff
changeset
|
144 %!assert (wm(lnd2), rcv) |
f1ea44e92df8
improve compatibility for single index indexing (bug #50776)
John W. Eaton <jwe@octave.org>
parents:
diff
changeset
|
145 %!assert (tm(lrv), rrv) |
f1ea44e92df8
improve compatibility for single index indexing (bug #50776)
John W. Eaton <jwe@octave.org>
parents:
diff
changeset
|
146 %!assert (tm(lcv), rcv) |
f1ea44e92df8
improve compatibility for single index indexing (bug #50776)
John W. Eaton <jwe@octave.org>
parents:
diff
changeset
|
147 %!assert (tm(lwm), rcv) |
f1ea44e92df8
improve compatibility for single index indexing (bug #50776)
John W. Eaton <jwe@octave.org>
parents:
diff
changeset
|
148 %!assert (tm(ltm), rcv) |
f1ea44e92df8
improve compatibility for single index indexing (bug #50776)
John W. Eaton <jwe@octave.org>
parents:
diff
changeset
|
149 %!assert (tm(lndv1), rndv1) |
f1ea44e92df8
improve compatibility for single index indexing (bug #50776)
John W. Eaton <jwe@octave.org>
parents:
diff
changeset
|
150 %!assert (tm(lndv2), rndv2) |
f1ea44e92df8
improve compatibility for single index indexing (bug #50776)
John W. Eaton <jwe@octave.org>
parents:
diff
changeset
|
151 %!assert (tm(lnd1), rcv) |
f1ea44e92df8
improve compatibility for single index indexing (bug #50776)
John W. Eaton <jwe@octave.org>
parents:
diff
changeset
|
152 %!assert (tm(lnd2), rcv) |
f1ea44e92df8
improve compatibility for single index indexing (bug #50776)
John W. Eaton <jwe@octave.org>
parents:
diff
changeset
|
153 %!assert (nd(lrv), rrv) |
f1ea44e92df8
improve compatibility for single index indexing (bug #50776)
John W. Eaton <jwe@octave.org>
parents:
diff
changeset
|
154 %!assert (nd(lcv), rcv) |
f1ea44e92df8
improve compatibility for single index indexing (bug #50776)
John W. Eaton <jwe@octave.org>
parents:
diff
changeset
|
155 %!assert (nd(lwm), rcv) |
f1ea44e92df8
improve compatibility for single index indexing (bug #50776)
John W. Eaton <jwe@octave.org>
parents:
diff
changeset
|
156 %!assert (nd(ltm), rcv) |
f1ea44e92df8
improve compatibility for single index indexing (bug #50776)
John W. Eaton <jwe@octave.org>
parents:
diff
changeset
|
157 %!assert (nd(lndv1), rndv1) |
f1ea44e92df8
improve compatibility for single index indexing (bug #50776)
John W. Eaton <jwe@octave.org>
parents:
diff
changeset
|
158 %!assert (nd(lndv2), rndv2) |
f1ea44e92df8
improve compatibility for single index indexing (bug #50776)
John W. Eaton <jwe@octave.org>
parents:
diff
changeset
|
159 %!assert (nd(lnd1), rcv) |
f1ea44e92df8
improve compatibility for single index indexing (bug #50776)
John W. Eaton <jwe@octave.org>
parents:
diff
changeset
|
160 %!assert (nd(lnd2), rcv) |
f1ea44e92df8
improve compatibility for single index indexing (bug #50776)
John W. Eaton <jwe@octave.org>
parents:
diff
changeset
|
161 |
f1ea44e92df8
improve compatibility for single index indexing (bug #50776)
John W. Eaton <jwe@octave.org>
parents:
diff
changeset
|
162 %!shared rv,cv,ndv,wm,tm,nd,irv,icv,iwm,itm,indv1,indv2,ind1,ind2,rrv,rcv,rndv1,rndv2 |
f1ea44e92df8
improve compatibility for single index indexing (bug #50776)
John W. Eaton <jwe@octave.org>
parents:
diff
changeset
|
163 %! rv = [1,2,3,4,5,6,7,8,9,10,11,12]; |
f1ea44e92df8
improve compatibility for single index indexing (bug #50776)
John W. Eaton <jwe@octave.org>
parents:
diff
changeset
|
164 %! cv = rv'; |
f1ea44e92df8
improve compatibility for single index indexing (bug #50776)
John W. Eaton <jwe@octave.org>
parents:
diff
changeset
|
165 %! ndv = reshape (rv, 1, 1, 12); |
f1ea44e92df8
improve compatibility for single index indexing (bug #50776)
John W. Eaton <jwe@octave.org>
parents:
diff
changeset
|
166 %! wm = reshape (rv, 2, 6); |
f1ea44e92df8
improve compatibility for single index indexing (bug #50776)
John W. Eaton <jwe@octave.org>
parents:
diff
changeset
|
167 %! tm = reshape (rv, 6, 2); |
f1ea44e92df8
improve compatibility for single index indexing (bug #50776)
John W. Eaton <jwe@octave.org>
parents:
diff
changeset
|
168 %! nd = reshape (rv, 2, 2, 3); |
f1ea44e92df8
improve compatibility for single index indexing (bug #50776)
John W. Eaton <jwe@octave.org>
parents:
diff
changeset
|
169 %! irv = [1,3,5,7,9,11]; |
f1ea44e92df8
improve compatibility for single index indexing (bug #50776)
John W. Eaton <jwe@octave.org>
parents:
diff
changeset
|
170 %! icv = irv'; |
f1ea44e92df8
improve compatibility for single index indexing (bug #50776)
John W. Eaton <jwe@octave.org>
parents:
diff
changeset
|
171 %! iwm = reshape (irv, 2, 3); |
f1ea44e92df8
improve compatibility for single index indexing (bug #50776)
John W. Eaton <jwe@octave.org>
parents:
diff
changeset
|
172 %! itm = reshape (irv, 3, 2); |
f1ea44e92df8
improve compatibility for single index indexing (bug #50776)
John W. Eaton <jwe@octave.org>
parents:
diff
changeset
|
173 %! indv1 = reshape (irv, 1, 1, 6); |
f1ea44e92df8
improve compatibility for single index indexing (bug #50776)
John W. Eaton <jwe@octave.org>
parents:
diff
changeset
|
174 %! indv2 = reshape (irv, 1, 1, 1, 6); |
f1ea44e92df8
improve compatibility for single index indexing (bug #50776)
John W. Eaton <jwe@octave.org>
parents:
diff
changeset
|
175 %! ind1 = reshape (irv, 2, 1, 3); |
f1ea44e92df8
improve compatibility for single index indexing (bug #50776)
John W. Eaton <jwe@octave.org>
parents:
diff
changeset
|
176 %! ind2 = reshape (irv, 1, 3, 2); |
f1ea44e92df8
improve compatibility for single index indexing (bug #50776)
John W. Eaton <jwe@octave.org>
parents:
diff
changeset
|
177 %! rrv = [1,3,5,7,9,11]; |
f1ea44e92df8
improve compatibility for single index indexing (bug #50776)
John W. Eaton <jwe@octave.org>
parents:
diff
changeset
|
178 %! rcv = rrv'; |
f1ea44e92df8
improve compatibility for single index indexing (bug #50776)
John W. Eaton <jwe@octave.org>
parents:
diff
changeset
|
179 %! rndv1 = reshape (rrv, 1, 1, 6); |
f1ea44e92df8
improve compatibility for single index indexing (bug #50776)
John W. Eaton <jwe@octave.org>
parents:
diff
changeset
|
180 %! rndv2 = reshape (rrv, 1, 1, 1, 6); |
f1ea44e92df8
improve compatibility for single index indexing (bug #50776)
John W. Eaton <jwe@octave.org>
parents:
diff
changeset
|
181 %!assert (rv(irv), rrv) |
f1ea44e92df8
improve compatibility for single index indexing (bug #50776)
John W. Eaton <jwe@octave.org>
parents:
diff
changeset
|
182 %!assert (rv(icv), rrv) |
f1ea44e92df8
improve compatibility for single index indexing (bug #50776)
John W. Eaton <jwe@octave.org>
parents:
diff
changeset
|
183 %!assert (rv(iwm), iwm) |
f1ea44e92df8
improve compatibility for single index indexing (bug #50776)
John W. Eaton <jwe@octave.org>
parents:
diff
changeset
|
184 %!assert (rv(itm), itm) |
f1ea44e92df8
improve compatibility for single index indexing (bug #50776)
John W. Eaton <jwe@octave.org>
parents:
diff
changeset
|
185 %!assert (rv(indv1), rrv) |
f1ea44e92df8
improve compatibility for single index indexing (bug #50776)
John W. Eaton <jwe@octave.org>
parents:
diff
changeset
|
186 %!assert (rv(indv2), rrv) |
f1ea44e92df8
improve compatibility for single index indexing (bug #50776)
John W. Eaton <jwe@octave.org>
parents:
diff
changeset
|
187 %!assert (rv(ind1), ind1) |
f1ea44e92df8
improve compatibility for single index indexing (bug #50776)
John W. Eaton <jwe@octave.org>
parents:
diff
changeset
|
188 %!assert (rv(ind2), ind2) |
f1ea44e92df8
improve compatibility for single index indexing (bug #50776)
John W. Eaton <jwe@octave.org>
parents:
diff
changeset
|
189 %!assert (cv(irv), rcv) |
f1ea44e92df8
improve compatibility for single index indexing (bug #50776)
John W. Eaton <jwe@octave.org>
parents:
diff
changeset
|
190 %!assert (cv(icv), rcv) |
f1ea44e92df8
improve compatibility for single index indexing (bug #50776)
John W. Eaton <jwe@octave.org>
parents:
diff
changeset
|
191 %!assert (cv(iwm), iwm) |
f1ea44e92df8
improve compatibility for single index indexing (bug #50776)
John W. Eaton <jwe@octave.org>
parents:
diff
changeset
|
192 %!assert (cv(itm), itm) |
f1ea44e92df8
improve compatibility for single index indexing (bug #50776)
John W. Eaton <jwe@octave.org>
parents:
diff
changeset
|
193 %!assert (cv(indv1), rcv) |
f1ea44e92df8
improve compatibility for single index indexing (bug #50776)
John W. Eaton <jwe@octave.org>
parents:
diff
changeset
|
194 %!assert (cv(indv2), rcv) |
f1ea44e92df8
improve compatibility for single index indexing (bug #50776)
John W. Eaton <jwe@octave.org>
parents:
diff
changeset
|
195 %!assert (cv(ind1), ind1) |
f1ea44e92df8
improve compatibility for single index indexing (bug #50776)
John W. Eaton <jwe@octave.org>
parents:
diff
changeset
|
196 %!assert (cv(ind2), ind2) |
f1ea44e92df8
improve compatibility for single index indexing (bug #50776)
John W. Eaton <jwe@octave.org>
parents:
diff
changeset
|
197 %!assert (ndv(irv), rndv1) |
f1ea44e92df8
improve compatibility for single index indexing (bug #50776)
John W. Eaton <jwe@octave.org>
parents:
diff
changeset
|
198 %!assert (ndv(icv), rndv1) |
f1ea44e92df8
improve compatibility for single index indexing (bug #50776)
John W. Eaton <jwe@octave.org>
parents:
diff
changeset
|
199 %!assert (ndv(iwm), iwm) |
f1ea44e92df8
improve compatibility for single index indexing (bug #50776)
John W. Eaton <jwe@octave.org>
parents:
diff
changeset
|
200 %!assert (ndv(itm), itm) |
f1ea44e92df8
improve compatibility for single index indexing (bug #50776)
John W. Eaton <jwe@octave.org>
parents:
diff
changeset
|
201 %!assert (ndv(indv1), rndv1) |
f1ea44e92df8
improve compatibility for single index indexing (bug #50776)
John W. Eaton <jwe@octave.org>
parents:
diff
changeset
|
202 %!assert (ndv(indv2), rndv1) |
f1ea44e92df8
improve compatibility for single index indexing (bug #50776)
John W. Eaton <jwe@octave.org>
parents:
diff
changeset
|
203 %!assert (ndv(ind1), ind1) |
f1ea44e92df8
improve compatibility for single index indexing (bug #50776)
John W. Eaton <jwe@octave.org>
parents:
diff
changeset
|
204 %!assert (ndv(ind2), ind2) |
f1ea44e92df8
improve compatibility for single index indexing (bug #50776)
John W. Eaton <jwe@octave.org>
parents:
diff
changeset
|
205 %!assert (wm(irv), rrv) |
f1ea44e92df8
improve compatibility for single index indexing (bug #50776)
John W. Eaton <jwe@octave.org>
parents:
diff
changeset
|
206 %!assert (wm(icv), rcv) |
f1ea44e92df8
improve compatibility for single index indexing (bug #50776)
John W. Eaton <jwe@octave.org>
parents:
diff
changeset
|
207 %!assert (wm(iwm), iwm) |
f1ea44e92df8
improve compatibility for single index indexing (bug #50776)
John W. Eaton <jwe@octave.org>
parents:
diff
changeset
|
208 %!assert (wm(itm), itm) |
f1ea44e92df8
improve compatibility for single index indexing (bug #50776)
John W. Eaton <jwe@octave.org>
parents:
diff
changeset
|
209 %!assert (wm(indv1), rndv1) |
f1ea44e92df8
improve compatibility for single index indexing (bug #50776)
John W. Eaton <jwe@octave.org>
parents:
diff
changeset
|
210 %!assert (wm(indv2), rndv2) |
f1ea44e92df8
improve compatibility for single index indexing (bug #50776)
John W. Eaton <jwe@octave.org>
parents:
diff
changeset
|
211 %!assert (wm(ind1), ind1) |
f1ea44e92df8
improve compatibility for single index indexing (bug #50776)
John W. Eaton <jwe@octave.org>
parents:
diff
changeset
|
212 %!assert (wm(ind2), ind2) |
f1ea44e92df8
improve compatibility for single index indexing (bug #50776)
John W. Eaton <jwe@octave.org>
parents:
diff
changeset
|
213 %!assert (tm(irv), rrv) |
f1ea44e92df8
improve compatibility for single index indexing (bug #50776)
John W. Eaton <jwe@octave.org>
parents:
diff
changeset
|
214 %!assert (tm(icv), rcv) |
f1ea44e92df8
improve compatibility for single index indexing (bug #50776)
John W. Eaton <jwe@octave.org>
parents:
diff
changeset
|
215 %!assert (tm(iwm), iwm) |
f1ea44e92df8
improve compatibility for single index indexing (bug #50776)
John W. Eaton <jwe@octave.org>
parents:
diff
changeset
|
216 %!assert (tm(itm), itm) |
f1ea44e92df8
improve compatibility for single index indexing (bug #50776)
John W. Eaton <jwe@octave.org>
parents:
diff
changeset
|
217 %!assert (tm(indv1), rndv1) |
f1ea44e92df8
improve compatibility for single index indexing (bug #50776)
John W. Eaton <jwe@octave.org>
parents:
diff
changeset
|
218 %!assert (tm(indv2), rndv2) |
f1ea44e92df8
improve compatibility for single index indexing (bug #50776)
John W. Eaton <jwe@octave.org>
parents:
diff
changeset
|
219 %!assert (tm(ind1), ind1) |
f1ea44e92df8
improve compatibility for single index indexing (bug #50776)
John W. Eaton <jwe@octave.org>
parents:
diff
changeset
|
220 %!assert (tm(ind2), ind2) |
f1ea44e92df8
improve compatibility for single index indexing (bug #50776)
John W. Eaton <jwe@octave.org>
parents:
diff
changeset
|
221 %!assert (nd(irv), rrv) |
f1ea44e92df8
improve compatibility for single index indexing (bug #50776)
John W. Eaton <jwe@octave.org>
parents:
diff
changeset
|
222 %!assert (nd(icv), rcv) |
f1ea44e92df8
improve compatibility for single index indexing (bug #50776)
John W. Eaton <jwe@octave.org>
parents:
diff
changeset
|
223 %!assert (nd(iwm), iwm) |
f1ea44e92df8
improve compatibility for single index indexing (bug #50776)
John W. Eaton <jwe@octave.org>
parents:
diff
changeset
|
224 %!assert (nd(itm), itm) |
f1ea44e92df8
improve compatibility for single index indexing (bug #50776)
John W. Eaton <jwe@octave.org>
parents:
diff
changeset
|
225 %!assert (nd(indv1), rndv1) |
f1ea44e92df8
improve compatibility for single index indexing (bug #50776)
John W. Eaton <jwe@octave.org>
parents:
diff
changeset
|
226 %!assert (nd(indv2), rndv2) |
f1ea44e92df8
improve compatibility for single index indexing (bug #50776)
John W. Eaton <jwe@octave.org>
parents:
diff
changeset
|
227 %!assert (nd(ind1), ind1) |
f1ea44e92df8
improve compatibility for single index indexing (bug #50776)
John W. Eaton <jwe@octave.org>
parents:
diff
changeset
|
228 %!assert (nd(ind2), ind2) |
f1ea44e92df8
improve compatibility for single index indexing (bug #50776)
John W. Eaton <jwe@octave.org>
parents:
diff
changeset
|
229 |
f1ea44e92df8
improve compatibility for single index indexing (bug #50776)
John W. Eaton <jwe@octave.org>
parents:
diff
changeset
|
230 %!shared rv,cv,ndv,wm,tm,nd,irv,icv,iwm,itm,indv1,indv2,ind1,ind2,rrv,rcv,rndv1,rndv2 |
f1ea44e92df8
improve compatibility for single index indexing (bug #50776)
John W. Eaton <jwe@octave.org>
parents:
diff
changeset
|
231 %! rv = [1,2,3,4,5,6,7,8,9,10,11,12]; |
f1ea44e92df8
improve compatibility for single index indexing (bug #50776)
John W. Eaton <jwe@octave.org>
parents:
diff
changeset
|
232 %! cv = rv'; |
f1ea44e92df8
improve compatibility for single index indexing (bug #50776)
John W. Eaton <jwe@octave.org>
parents:
diff
changeset
|
233 %! ndv = reshape (rv, 1, 1, 12); |
f1ea44e92df8
improve compatibility for single index indexing (bug #50776)
John W. Eaton <jwe@octave.org>
parents:
diff
changeset
|
234 %! wm = reshape (rv, 2, 6); |
f1ea44e92df8
improve compatibility for single index indexing (bug #50776)
John W. Eaton <jwe@octave.org>
parents:
diff
changeset
|
235 %! tm = reshape (rv, 6, 2); |
f1ea44e92df8
improve compatibility for single index indexing (bug #50776)
John W. Eaton <jwe@octave.org>
parents:
diff
changeset
|
236 %! nd = reshape (rv, 2, 2, 3); |
f1ea44e92df8
improve compatibility for single index indexing (bug #50776)
John W. Eaton <jwe@octave.org>
parents:
diff
changeset
|
237 %! irv = [1,2,3,4,5,6,7,8,9,10,11,12]; |
f1ea44e92df8
improve compatibility for single index indexing (bug #50776)
John W. Eaton <jwe@octave.org>
parents:
diff
changeset
|
238 %! icv = irv'; |
f1ea44e92df8
improve compatibility for single index indexing (bug #50776)
John W. Eaton <jwe@octave.org>
parents:
diff
changeset
|
239 %! iwm = reshape (irv, 2, 6); |
f1ea44e92df8
improve compatibility for single index indexing (bug #50776)
John W. Eaton <jwe@octave.org>
parents:
diff
changeset
|
240 %! itm = reshape (irv, 6, 2); |
f1ea44e92df8
improve compatibility for single index indexing (bug #50776)
John W. Eaton <jwe@octave.org>
parents:
diff
changeset
|
241 %! indv1 = reshape (irv, 1, 1, 12); |
f1ea44e92df8
improve compatibility for single index indexing (bug #50776)
John W. Eaton <jwe@octave.org>
parents:
diff
changeset
|
242 %! indv2 = reshape (irv, 1, 1, 1, 12); |
f1ea44e92df8
improve compatibility for single index indexing (bug #50776)
John W. Eaton <jwe@octave.org>
parents:
diff
changeset
|
243 %! ind1 = reshape (irv, 2, 2, 3); |
f1ea44e92df8
improve compatibility for single index indexing (bug #50776)
John W. Eaton <jwe@octave.org>
parents:
diff
changeset
|
244 %! ind2 = reshape (irv, 2, 3, 2); |
f1ea44e92df8
improve compatibility for single index indexing (bug #50776)
John W. Eaton <jwe@octave.org>
parents:
diff
changeset
|
245 %! rrv = [1,2,3,4,5,6,7,8,9,10,11,12]; |
f1ea44e92df8
improve compatibility for single index indexing (bug #50776)
John W. Eaton <jwe@octave.org>
parents:
diff
changeset
|
246 %! rcv = rrv'; |
f1ea44e92df8
improve compatibility for single index indexing (bug #50776)
John W. Eaton <jwe@octave.org>
parents:
diff
changeset
|
247 %! rndv1 = reshape (rrv, 1, 1, 12); |
f1ea44e92df8
improve compatibility for single index indexing (bug #50776)
John W. Eaton <jwe@octave.org>
parents:
diff
changeset
|
248 %! rndv2 = reshape (rrv, 1, 1, 1, 12); |
f1ea44e92df8
improve compatibility for single index indexing (bug #50776)
John W. Eaton <jwe@octave.org>
parents:
diff
changeset
|
249 %!assert (rv(irv), rrv) |
f1ea44e92df8
improve compatibility for single index indexing (bug #50776)
John W. Eaton <jwe@octave.org>
parents:
diff
changeset
|
250 %!assert (rv(icv), rrv) |
f1ea44e92df8
improve compatibility for single index indexing (bug #50776)
John W. Eaton <jwe@octave.org>
parents:
diff
changeset
|
251 %!assert (rv(iwm), iwm) |
f1ea44e92df8
improve compatibility for single index indexing (bug #50776)
John W. Eaton <jwe@octave.org>
parents:
diff
changeset
|
252 %!assert (rv(itm), itm) |
f1ea44e92df8
improve compatibility for single index indexing (bug #50776)
John W. Eaton <jwe@octave.org>
parents:
diff
changeset
|
253 %!assert (rv(indv1), rrv) |
f1ea44e92df8
improve compatibility for single index indexing (bug #50776)
John W. Eaton <jwe@octave.org>
parents:
diff
changeset
|
254 %!assert (rv(indv2), rrv) |
f1ea44e92df8
improve compatibility for single index indexing (bug #50776)
John W. Eaton <jwe@octave.org>
parents:
diff
changeset
|
255 %!assert (rv(ind1), ind1) |
f1ea44e92df8
improve compatibility for single index indexing (bug #50776)
John W. Eaton <jwe@octave.org>
parents:
diff
changeset
|
256 %!assert (rv(ind2), ind2) |
f1ea44e92df8
improve compatibility for single index indexing (bug #50776)
John W. Eaton <jwe@octave.org>
parents:
diff
changeset
|
257 %!assert (cv(irv), rcv) |
f1ea44e92df8
improve compatibility for single index indexing (bug #50776)
John W. Eaton <jwe@octave.org>
parents:
diff
changeset
|
258 %!assert (cv(icv), rcv) |
f1ea44e92df8
improve compatibility for single index indexing (bug #50776)
John W. Eaton <jwe@octave.org>
parents:
diff
changeset
|
259 %!assert (cv(iwm), iwm) |
f1ea44e92df8
improve compatibility for single index indexing (bug #50776)
John W. Eaton <jwe@octave.org>
parents:
diff
changeset
|
260 %!assert (cv(itm), itm) |
f1ea44e92df8
improve compatibility for single index indexing (bug #50776)
John W. Eaton <jwe@octave.org>
parents:
diff
changeset
|
261 %!assert (cv(indv1), rcv) |
f1ea44e92df8
improve compatibility for single index indexing (bug #50776)
John W. Eaton <jwe@octave.org>
parents:
diff
changeset
|
262 %!assert (cv(indv2), rcv) |
f1ea44e92df8
improve compatibility for single index indexing (bug #50776)
John W. Eaton <jwe@octave.org>
parents:
diff
changeset
|
263 %!assert (cv(ind1), ind1) |
f1ea44e92df8
improve compatibility for single index indexing (bug #50776)
John W. Eaton <jwe@octave.org>
parents:
diff
changeset
|
264 %!assert (cv(ind2), ind2) |
f1ea44e92df8
improve compatibility for single index indexing (bug #50776)
John W. Eaton <jwe@octave.org>
parents:
diff
changeset
|
265 %!assert (ndv(irv), rndv1) |
f1ea44e92df8
improve compatibility for single index indexing (bug #50776)
John W. Eaton <jwe@octave.org>
parents:
diff
changeset
|
266 %!assert (ndv(icv), rndv1) |
f1ea44e92df8
improve compatibility for single index indexing (bug #50776)
John W. Eaton <jwe@octave.org>
parents:
diff
changeset
|
267 %!assert (ndv(iwm), iwm) |
f1ea44e92df8
improve compatibility for single index indexing (bug #50776)
John W. Eaton <jwe@octave.org>
parents:
diff
changeset
|
268 %!assert (ndv(itm), itm) |
f1ea44e92df8
improve compatibility for single index indexing (bug #50776)
John W. Eaton <jwe@octave.org>
parents:
diff
changeset
|
269 %!assert (ndv(indv1), rndv1) |
f1ea44e92df8
improve compatibility for single index indexing (bug #50776)
John W. Eaton <jwe@octave.org>
parents:
diff
changeset
|
270 %!assert (ndv(indv2), rndv1) |
f1ea44e92df8
improve compatibility for single index indexing (bug #50776)
John W. Eaton <jwe@octave.org>
parents:
diff
changeset
|
271 %!assert (ndv(ind1), ind1) |
f1ea44e92df8
improve compatibility for single index indexing (bug #50776)
John W. Eaton <jwe@octave.org>
parents:
diff
changeset
|
272 %!assert (ndv(ind2), ind2) |
f1ea44e92df8
improve compatibility for single index indexing (bug #50776)
John W. Eaton <jwe@octave.org>
parents:
diff
changeset
|
273 %!assert (wm(irv), rrv) |
f1ea44e92df8
improve compatibility for single index indexing (bug #50776)
John W. Eaton <jwe@octave.org>
parents:
diff
changeset
|
274 %!assert (wm(icv), rcv) |
f1ea44e92df8
improve compatibility for single index indexing (bug #50776)
John W. Eaton <jwe@octave.org>
parents:
diff
changeset
|
275 %!assert (wm(iwm), iwm) |
f1ea44e92df8
improve compatibility for single index indexing (bug #50776)
John W. Eaton <jwe@octave.org>
parents:
diff
changeset
|
276 %!assert (wm(itm), itm) |
f1ea44e92df8
improve compatibility for single index indexing (bug #50776)
John W. Eaton <jwe@octave.org>
parents:
diff
changeset
|
277 %!assert (wm(indv1), rndv1) |
f1ea44e92df8
improve compatibility for single index indexing (bug #50776)
John W. Eaton <jwe@octave.org>
parents:
diff
changeset
|
278 %!assert (wm(indv2), rndv2) |
f1ea44e92df8
improve compatibility for single index indexing (bug #50776)
John W. Eaton <jwe@octave.org>
parents:
diff
changeset
|
279 %!assert (wm(ind1), ind1) |
f1ea44e92df8
improve compatibility for single index indexing (bug #50776)
John W. Eaton <jwe@octave.org>
parents:
diff
changeset
|
280 %!assert (wm(ind2), ind2) |
f1ea44e92df8
improve compatibility for single index indexing (bug #50776)
John W. Eaton <jwe@octave.org>
parents:
diff
changeset
|
281 %!assert (tm(irv), rrv) |
f1ea44e92df8
improve compatibility for single index indexing (bug #50776)
John W. Eaton <jwe@octave.org>
parents:
diff
changeset
|
282 %!assert (tm(icv), rcv) |
f1ea44e92df8
improve compatibility for single index indexing (bug #50776)
John W. Eaton <jwe@octave.org>
parents:
diff
changeset
|
283 %!assert (tm(iwm), iwm) |
f1ea44e92df8
improve compatibility for single index indexing (bug #50776)
John W. Eaton <jwe@octave.org>
parents:
diff
changeset
|
284 %!assert (tm(itm), itm) |
f1ea44e92df8
improve compatibility for single index indexing (bug #50776)
John W. Eaton <jwe@octave.org>
parents:
diff
changeset
|
285 %!assert (tm(indv1), rndv1) |
f1ea44e92df8
improve compatibility for single index indexing (bug #50776)
John W. Eaton <jwe@octave.org>
parents:
diff
changeset
|
286 %!assert (tm(indv2), rndv2) |
f1ea44e92df8
improve compatibility for single index indexing (bug #50776)
John W. Eaton <jwe@octave.org>
parents:
diff
changeset
|
287 %!assert (tm(ind1), ind1) |
f1ea44e92df8
improve compatibility for single index indexing (bug #50776)
John W. Eaton <jwe@octave.org>
parents:
diff
changeset
|
288 %!assert (tm(ind2), ind2) |
f1ea44e92df8
improve compatibility for single index indexing (bug #50776)
John W. Eaton <jwe@octave.org>
parents:
diff
changeset
|
289 %!assert (nd(irv), rrv) |
f1ea44e92df8
improve compatibility for single index indexing (bug #50776)
John W. Eaton <jwe@octave.org>
parents:
diff
changeset
|
290 %!assert (nd(icv), rcv) |
f1ea44e92df8
improve compatibility for single index indexing (bug #50776)
John W. Eaton <jwe@octave.org>
parents:
diff
changeset
|
291 %!assert (nd(iwm), iwm) |
f1ea44e92df8
improve compatibility for single index indexing (bug #50776)
John W. Eaton <jwe@octave.org>
parents:
diff
changeset
|
292 %!assert (nd(itm), itm) |
f1ea44e92df8
improve compatibility for single index indexing (bug #50776)
John W. Eaton <jwe@octave.org>
parents:
diff
changeset
|
293 %!assert (nd(indv1), rndv1) |
f1ea44e92df8
improve compatibility for single index indexing (bug #50776)
John W. Eaton <jwe@octave.org>
parents:
diff
changeset
|
294 %!assert (nd(indv2), rndv2) |
f1ea44e92df8
improve compatibility for single index indexing (bug #50776)
John W. Eaton <jwe@octave.org>
parents:
diff
changeset
|
295 %!assert (nd(ind1), ind1) |
f1ea44e92df8
improve compatibility for single index indexing (bug #50776)
John W. Eaton <jwe@octave.org>
parents:
diff
changeset
|
296 %!assert (nd(ind2), ind2) |