Mercurial > octave-nkf
comparison scripts/signal/rectangle_lw.m @ 7125:f084ba47812b
[project @ 2007-11-08 02:29:23 by jwe]
author | jwe |
---|---|
date | Thu, 08 Nov 2007 02:29:24 +0000 |
parents | a1dbe9d80eee |
children | 1bf0ce0930be |
comparison
equal
deleted
inserted
replaced
7124:d07cb867891b | 7125:f084ba47812b |
---|---|
26 ## Author: FL <Friedrich.Leisch@ci.tuwien.ac.at> | 26 ## Author: FL <Friedrich.Leisch@ci.tuwien.ac.at> |
27 ## Description: Rectangular lag window | 27 ## Description: Rectangular lag window |
28 | 28 |
29 function retval = rectangle_lw (n, b) | 29 function retval = rectangle_lw (n, b) |
30 | 30 |
31 if (nargin != 2) | |
32 print_usage (); | |
33 endif | |
34 | |
31 retval = zeros (n, 1); | 35 retval = zeros (n, 1); |
32 t = floor (1 / b); | 36 t = floor (1 / b); |
33 | 37 |
34 retval (1:t, 1) = ones (t, 1); | 38 retval (1:t, 1) = ones (t, 1); |
35 | 39 |