Mercurial > hg > ishara
comparison dsp/zeropad.m @ 32:c3b0cd708782
Imported core dsp tools.
author | samer |
---|---|
date | Sun, 20 Jan 2013 13:48:47 +0000 |
parents | |
children |
comparison
equal
deleted
inserted
replaced
31:8cc4f326fc66 | 32:c3b0cd708782 |
---|---|
1 function y=zeropad(n,x) | |
2 % ZEROPAD - Function to zero pad a signal | |
3 % | |
4 % y=zeropad(n,x) : adds n zeros to head and tail of signal | |
5 % If n<=0, y=x; | |
6 | |
7 if n>0, | |
8 y=[zeros(n,1); x(:); zeros(n,1)]; | |
9 else | |
10 y=x(:); | |
11 end |