Need help with Difference Equation

Hi. We are asked by our teacher to create a Matlab program that solves for the first 10 terms given the LCCDE. This is to be done iteratively:
3y(n) - y(n-1) + y(n-2) = -x(n)
x(n) = n^2 u(n)
y(-1)=-2
y(-2)=1

답변 (1개)

Azzi Abdelmalek
Azzi Abdelmalek 2013년 8월 7일

1 개 추천

You can use a for loop, because Matlab does not allow indices <=0 you should begin your for loop with k=3. then your initial conditions will be y(1)=1 and y(2)=-2

카테고리

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

질문:

2013년 8월 7일

Community Treasure Hunt

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

Start Hunting!

Translated by