Mercurial > hg > ishara
annotate dsp/zeropad.m @ 36:9e7be347b3a0
Renamed sequence classes to avoid clashes with seq methods;
Fixed default slicing dimension while retaining behaviour of window.m;
Updated use of sequences in dsp/synth.
author | samer |
---|---|
date | Thu, 24 Jan 2013 14:51:23 +0000 |
parents | c3b0cd708782 |
children |
rev | line source |
---|---|
samer@32 | 1 function y=zeropad(n,x) |
samer@32 | 2 % ZEROPAD - Function to zero pad a signal |
samer@32 | 3 % |
samer@32 | 4 % y=zeropad(n,x) : adds n zeros to head and tail of signal |
samer@32 | 5 % If n<=0, y=x; |
samer@32 | 6 |
samer@32 | 7 if n>0, |
samer@32 | 8 y=[zeros(n,1); x(:); zeros(n,1)]; |
samer@32 | 9 else |
samer@32 | 10 y=x(:); |
samer@32 | 11 end |