📄 program_1a.m
字号:
% Chapter 1 - Linear Discrete Dynamical Systems.
% Program 1a - Solving Recurrence Relations.
% Symbolic Math toolbox required.
% Copyright Birkhauser 2004. Stephen Lynch.
% Solving a first order recurrence relation (Example 1).
% Call a Maple command from the Symbolic Math toolbox.
xn=maple('rsolve({x(n+1)-(1+(3/(100)))*x(n),x(0)=10000},x)')
n=5
savings=vpa(eval(xn),7)
%Solving a second order recurrence relation (Example 2(i)).
clear
xn=maple('rsolve({x(n+2)-x(n+1)-6*x(n),x(0)=1,x(1)=2},x)')
% Solving a characteristic equation (Example 2(iii)).
syms lambda
CE=lambda^2-lambda+1
lambda=solve(CE)
% End of Program 1a.
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -