Mercurial > hg > ishara
annotate dsp/zeropad.m @ 61:eff6bddf82e3 tip
Finally implemented perceptual brightness thing.
author | samer |
---|---|
date | Sun, 11 Oct 2015 10:20:42 +0100 |
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 |