Mercurial > hg > octave-lyh
comparison scripts/polynomial/conv.m @ 7411:83a8781b529d
[project @ 2008-01-22 21:52:25 by jwe]
author | jwe |
---|---|
date | Tue, 22 Jan 2008 21:52:26 +0000 |
parents | a1dbe9d80eee |
children | 15e4a450bf84 |
comparison
equal
deleted
inserted
replaced
7410:8a3b2ccc4e11 | 7411:83a8781b529d |
---|---|
71 endif | 71 endif |
72 y = filter (b, 1, x); | 72 y = filter (b, 1, x); |
73 endif | 73 endif |
74 | 74 |
75 endfunction | 75 endfunction |
76 | |
77 %!assert(all (all (conv (ones (3, 1), ones (3, 1)) == [1, 2, 3, 2, 1]))); | |
78 | |
79 %!assert(all (all (conv (ones (1, 3), ones (3, 1)) == [1, 2, 3, 2, 1]))); | |
80 | |
81 %!assert(all (all (conv (3, [1, 2, 3]) == [3, 6, 9]))); | |
82 | |
83 %!error conv ([1, 2; 3, 4], 3); | |
84 | |
85 %!assert(conv (2, 3),6); | |
86 | |
87 %!error conv (2, []); | |
88 |