comparison scripts/signal/triangle_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: Triangular lag window 27 ## Description: Triangular lag window
28 28
29 function retval = triangle_lw (n, b) 29 function retval = triangle_lw (n, b)
30 30
31 if (nargin != 2)
32 print_usage ();
33 endif
34
31 retval = 1 - (0 : n-1)' * b; 35 retval = 1 - (0 : n-1)' * b;
32 retval = max ([retval'; (zeros (1, n))])'; 36 retval = max ([retval'; (zeros (1, n))])';
33 37
34 endfunction 38 endfunction
35 39