How to Solve recurrence equation
58 ビュー (過去 30 日間)
古いコメントを表示
How to solve the recurrence equation
h[n]=-0.36*h[n-2]+1.2*h[n-1]
採用された回答
Star Strider
2022 年 9 月 17 日
Try something like this —
h(1) = rand; % Initial Condition
h(2) = rand; % Initial Condition
N = 50;
for n = 3:N
h(n)=-0.36*h(n-2)+1.2*h(n-1);
end
nv = 1:N;
figure
plot(nv, h, '.-')
grid
xlabel('n')
ylabel('h')
Experiment to get the result you want.
.
14 件のコメント
Torsten
2022 年 9 月 18 日
編集済み: Torsten
2022 年 9 月 18 日
I don't know your code, but as you can see above, plotting is possible.
nv and h are both vectors of size 1 x (10/T+1) (1 x 26 for T = 0.4).
101 smells like T = 0.1 while 26 smells like T = 0.4. I think you somehow mixed the two stepsizes for T in the h and nv arrays.
その他の回答 (1 件)
Walter Roberson
2022 年 9 月 17 日
See https://www.mathworks.com/matlabcentral/answers/1805355-how-do-i-translate-rec-from-mupad-to-matlab-symbolic-math-toolbox#answer_1053500 for solving recurrance equations using ztrans()
0 件のコメント
参考
カテゴリ
Help Center および File Exchange で Calculus についてさらに検索
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!