?? program_9b.m
字號(hào):
% Chapter 9 - Interacting Species.
% Program_9b - The Holling-Tanner Model (Time series).
% Copyright Birkhauser 2004. Stephen Lynch.
% Time series of a predator/prey model.
clear
hold on
sys=inline('[x(1)*(1-x(1)/7)-6*x(1)*x(2)/(7+7*x(1));0.2*x(2)*(1-.5*x(2)/x(1))]','t','x')
options = odeset('RelTol',1e-4,'AbsTol',1e-4);
[t,xa]=ode45(sys,[0 200],[7.1 .1],options);
plot(t,xa(:,1),'r')
plot(t,xa(:,2),'b')
legend('prey','predator')
axis([0 200 0 8])
fsize=15;
set(gca,'xtick',[0:50:200],'FontSize',fsize)
set(gca,'ytick',[0:2:8],'FontSize',fsize)
xlabel('time','FontSize',fsize)
ylabel('population','FontSize',fsize)
hold off
% End of Program_9b.
?? 快捷鍵說(shuō)明
復(fù)制代碼
Ctrl + C
搜索代碼
Ctrl + F
全屏模式
F11
切換主題
Ctrl + Shift + D
顯示快捷鍵
?
增大字號(hào)
Ctrl + =
減小字號(hào)
Ctrl + -