Info

Cette question est clôturée. Rouvrir pour modifier ou répondre.

Filter command doesnot work here. what can i do?

10 vues (au cours des 30 derniers jours)
Nazi khan
Nazi khan le 9 Avr 2016
Clôturé : MATLAB Answer Bot le 20 Août 2021
n = 1000;
n = randi([-1 1],n,1);
j= (n >= 0);
jm=(n<0);
j1(j)=1;
j1(jm)=-1;
dataIn=j1(:);
h=[1 -0.5 0.25];
y=conv(h,dataIn);
z = y(1:end-2,:);
noise1=normrnd(0,0.1,[length(z)],1); %generate noise signal of zero mean and 0.1 variance
r1=z+noise1;
d=r1(1:end-950,:); %take 50 values of output
mu = 18; % NLMS step size
offset = 50; % NLMS offset
ha = adaptfilt.nlms(3,mu,1,offset);
[y,e] = filter(ha,x,d);
stem([h', ha.coefficients']);
legend('Actual','Estimated'); grid on;
xlabel('Coefficient #'); ylabel('Coefficient Value');
  1 commentaire
Jan
Jan le 9 Avr 2016
Start with explaining "doesn't work" with any details. Do you get an error message or do the results differ from your expectations?

Réponses (0)

Cette question est clôturée.

Community Treasure Hunt

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

Start Hunting!

Translated by