annotate arrows/dsp/aresample.m @ 6:0ce3c2070089

Removed duplicate code and fixed doc in timed_action.
author samer
date Mon, 14 Jan 2013 14:33:37 +0000
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)]});