What is difference between decimate(8,15,'fir') and dsp.FIRDec​imate(8,fi​r1(15,1/8)​) function

2 views (last 30 days)
Hi ,
I'm currently working on decimate function to low pass the input signal and decimate it by a factor of 8.My input signal contains 1024 samples and signals with frequency upto 10MHz.I'm decimating input signal by 8 to reduce total samples to 128 and to reduce signal frequency content upto 2MHz.
I'm using decimate(8,15,'fir') function to decimate the signal.After decimate result have 128 samples with max frequency content of 2Mhz it is working properly.But wen i use dsp.FIRDecimate(8,fir1(15,1/8)) function decimated signal have 128 samples but i'm not seeing any frequency content in that signal.Below i have given both code please help me out get same result by using both function .If i'm using functions in wrong way means correct me.
Here is my code %% decimate yfd = decimate(y,8,15,'fir');
%% dsp.FIRDecimate H = dsp.FIRDecimator; H.DecimationFactor = 8; H.Numerator = fir1(15,(1/8)); H.Structure = 'Direct form transposed'; decim_output = step(H,lpf_output);
%%%%%%%%% Thanks in advance,
Regards, Jinesh

Answers (0)

Tags

Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!