Solving difference equation with its initial conditions
古いコメントを表示
Hi,
Consider a difference equation:
8*y[n] - 6*y[n-1] + 2*y[n-2] = 1
with initial conditions
y[0]= 0 and y[-1]=2
How can I determine its plot y(n) in Matlab? Thank you in advance for your help!
2 件のコメント
John D'Errico
2017 年 2 月 19 日
Surely you can use a loop? Why not make an effort? You have the first two values, so a simple loop will suffice.
More importantly, you need to spend some time learning MATLAB. Read the getting started tutorials. It is apparent that you don't know how to even use indexing in MATLAB, nor how to use a for loop.
You will need to recognize that MATLAB does NOT allow zero or negative indices.
Walter Roberson
2017 年 2 月 19 日
I would call this a recurrence equation, not a difference equation.
採用された回答
その他の回答 (1 件)
Sindhuja Parimalarangan
2017 年 2 月 21 日
4 投票
カテゴリ
ヘルプ センター および File Exchange で Programming についてさらに検索
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!