Mercurial > hg > octave-lyh
comparison scripts/set/intersect.m @ 8507:cadc73247d65
style fixes
author | John W. Eaton <jwe@octave.org> |
---|---|
date | Tue, 13 Jan 2009 14:08:36 -0500 |
parents | e56bb65186f6 |
children | eb63fbe60fab |
comparison
equal
deleted
inserted
replaced
8506:bc982528de11 | 8507:cadc73247d65 |
---|---|
85 %!# Test the routine for index vectors ia and ib | 85 %!# Test the routine for index vectors ia and ib |
86 %!test | 86 %!test |
87 %! a = [3 2 4 5 7 6 5 1 0 13 13]; | 87 %! a = [3 2 4 5 7 6 5 1 0 13 13]; |
88 %! b = [3 5 12 1 1 7]; | 88 %! b = [3 5 12 1 1 7]; |
89 %! [c,ia,ib] = intersect(a,b); | 89 %! [c,ia,ib] = intersect(a,b); |
90 %! assert( c,[1 3 5 7]); | 90 %! assert(c,[1 3 5 7]); |
91 %! assert(ia,[8 1 7 5]); | 91 %! assert(ia,[8 1 7 5]); |
92 %! assert(ib,[5 1 2 6]); | 92 %! assert(ib,[5 1 2 6]); |
93 %! assert(a(ia),c); | 93 %! assert(a(ia),c); |
94 %! assert(b(ib),c); | 94 %! assert(b(ib),c); |
95 %!test | 95 %!test |