annotate arrows/dsp/aresample.m @ 61:eff6bddf82e3
tip
Finally implemented perceptual brightness thing.
author |
samer |
date |
Sun, 11 Oct 2015 10:20:42 +0100 |
parents |
672052bd81f8 |
children |
|
rev |
line source |
samer@0
|
1 function a=aresample(f1,f2)
|
samer@0
|
2 f0=gcd(f1,f2);
|
samer@0
|
3 p=f2/f0; q=f1/f0;
|
samer@0
|
4 %[y,num]=resample(zeros(16,1),p,q);
|
samer@0
|
5 num=get(mfilt.firsrc(p,q),'Numerator'); % design resampling filter using mfilt
|
samer@0
|
6 a=asysobj(@(sz)dsp.FIRRateConverter(p,q,num),1,1,@(sz){[sz{1}(1)*f2/f1,sz{1}(2)]});
|