i didn,t get any values in command window from this code

조회 수: 1 (최근 30일)
Nazi khan
Nazi khan 2016년 4월 10일
댓글: Nazi khan 2016년 4월 10일
%%K=10%%
a = 1000;
a = randi([-1 1],a,1);
b= (a >= 0);
bm=(a<0);
b1(b)=1;
b1(bm)=-1;
d=b1(:);
h=[1 0.25 -0.5];
c=conv(h,d);
e=c(1:end-2,:);
noise1 =normrnd(0,0.1,[length(e)],1); % noise signal of zero mean and 0.1 variance
f1=e+noise1;
t=f1(1:end-990,:); %take 10 values
ss = 16; % NLMS step size
offset = 50; % NLMS offset
ha = adaptfilt.nlms(3,ss,1,offset);
stem([h', ha.coefficients']);
legend('Actual','Estimated');
xlabel('Coefficient number'); ylabel('Coefficient Value');

채택된 답변

Azzi Abdelmalek
Azzi Abdelmalek 2016년 4월 10일
편집: Azzi Abdelmalek 2016년 4월 10일
Just type the variable you need to display
ha
Or remove the semicolon ; at the end of the lines of your code
  댓글 수: 1
Nazi khan
Nazi khan 2016년 4월 10일
i do this but still getting no values in command window

댓글을 달려면 로그인하십시오.

추가 답변 (0개)

카테고리

Help CenterFile Exchange에서 Signal Processing에 대해 자세히 알아보기

Community Treasure Hunt

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

Start Hunting!

Translated by