Hello Please help in FIR1 filtering. I clearly mentioned in the code about what I want to do.
clear allclcfm=100; % signal freq
fs=800; % sampling feq
fn=2*fm; %Nyquist rate
t=0:1/fs:0.1;X = 2*sin(2*pi*fm*t) ;% Here I created 100 hz sine wave
% addes some noise to it
Y=X+randn(1,length(X));figureplot(t,X)hold onplot(t,Y,'r')% I need to have passband of the signal
% between 80Hz to 120 Hz
% So normalized frequencies are
fw1=fm/fn-0.1; % 80 Hz
fw2=fm/fn+0.1; % 120 Hz
% Coefficents for fir filter within passband
b = fir1(12,[fw1 fw2]);figurefreqz(b,1,128)% I convolved filter coefficients with noised signal
Filt_out=conv(b,Y);figureplot(Filt_out)% Filtered Signal output
But Iam not getting filtered output..Please help to get the filtered output.
Best Answer