⭐ 欢迎来到虫虫下载站! | 📦 资源下载 📁 资源专辑 ℹ️ 关于我们
⭐ 虫虫下载站

📄 popdemo.m

📁 本书是电子通信类的本科、研究生辅助教材
💻 M
字号:
echo off
% POPDEMO
%    --------------   Population Demo   ---------------
%   This system models a population in which the number of 
%   members follows the law dm/dt = a * m - b * m * m.
%   A is taken to represent a reproductive rate and b 
%   represents competition.
%
%   20 simulations will be run using different starting 
%   populations.

%	Copyright (c) 1990-94 by The MathWorks, Inc.

clc
clg
hold off; 
help popdemo
echo on
pause % Strike any key to continue.
axis([0,300,0,100]);
plot(0,0,300,100);
grid;
xlabel('Time');
ylabel('Population Size');
hold on;
echo on;
%
%    This loop runs 20 simulations and plots the results.

for ind = 20:-1:1
    initial_pop = ind * 5 + 1;
    [t,x] = rk23('pops',300); 
    % use Runga-Kutta to simulate pops until t = 300.
    plot(t,x);
end
%   Different numbers in a and b will result in different 
%   final populations.  You can change these values 
%   and select this demo from the menu again.
%
pause   
%   Select this window and strike any key to end this demo.
echo off;
hold off;
clc;

⌨️ 快捷键说明

复制代码 Ctrl + C
搜索代码 Ctrl + F
全屏模式 F11
切换主题 Ctrl + Shift + D
显示快捷键 ?
增大字号 Ctrl + =
减小字号 Ctrl + -