function h=dd1(n)
h=zeros(1, length(n));
n = [1 2 3 4 5 6 7];
h(n==0) = 1;
n=-10:10;
h(n)=dd1(n-3)-2.7083*dd1(n-4)+4.1861*dd1(n-5)-3.0451*dd1(n-6)+0.73071*dd1(n-7);
stem(n, h)
xlabel('n')
ylabel('Delta Function')
Thank you.

 채택된 답변

Azzi Abdelmalek
Azzi Abdelmalek 2016년 3월 20일

0 개 추천

function h=dd1(n)
h=zeros(1, length(n));
% n = [1 2 3 4 5 6 7]; % What this line is doing here?
h(n==0) = 1;
The call your function
n=-10:10;
h=dd1(n-3)-2.7083*dd1(n-4)+4.1861*dd1(n-5)-3.0451*dd1(n-6)+0.73071*dd1(n-7);
stem(n, h)
xlabel('n')
ylabel('Delta Function')

댓글 수: 2

Kuheli Mondal
Kuheli Mondal 2016년 3월 20일
??? Input argument "n" is undefined.
Error in ==> dd1 at 4 h=zeros(1, length(n)); how to solve this error
Image Analyst
Image Analyst 2016년 3월 20일
The question is now marked as Accepted so I presume you corrected it by now.

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

추가 답변 (0개)

카테고리

도움말 센터File Exchange에서 MATLAB에 대해 자세히 알아보기

태그

아직 태그를 입력하지 않았습니다.

질문:

2016년 3월 20일

댓글:

2016년 3월 20일

Community Treasure Hunt

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

Start Hunting!

Translated by