?? 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 + -