数学建模(7)——Logistic模型

一、马尔萨斯人口模型

python 复制代码
import numpy as np
import matplotlib.pyplot as plt

# 初始人口
N0 = 100
# 人口增长率
r = 0.02
# 时间段(年)
t = np.linspace(0, 200, 200)

# 马尔萨斯人口模型
N = N0 * np.exp(r * t)

# 绘图
plt.plot(t, N, label='Population')
plt.xlabel('Time (years)')
plt.ylabel('Population')
plt.title('Malthusian Population Growth Model')
plt.legend()
plt.grid(True)
plt.show()

二、阻滞型人口模型

待求参数:K,N0,r

python 复制代码
import numpy as np
import matplotlib.pyplot as plt

# 初始参数
N0 = 10    # 初始人口数量
r = 0.1    # 内禀增长率
K = 1000   # 环境容量
t = np.linspace(0, 100, 400)  # 时间段

# 计算人口数量
N = K / (1 + (K - N0) / N0 * np.exp(-r * t))

# 绘图
plt.plot(t, N, label='Population')
plt.xlabel('Time')
plt.ylabel('Population')
plt.title('Logistic Population Growth Model')
plt.legend()
plt.grid(True)
plt.show()

三、模型用法 --预测趋势

用法:根据已有数据预测 未来的数据;根据不同数据的趋势选择不同的模型,一般用阻滞型人口模型

比如:预测工资

相关推荐
keke.shengfengpolang9 小时前
金融工程毕业能干什么?银行、证券、数据岗怎么选
数学建模·金融
叩码以求索3 天前
三维建模:SolidWorks 2025保姆级下载与安装教程指南
学习·数学建模
spssau4 天前
数学建模暑假备赛指南 | 组队、五类常用模型、论文获取、AI使用规范一次讲清
数学建模·数据分析·spssau
学究天人9 天前
数学公理体系大全:第七章 连续统假设与力迫法简介
人工智能·算法·机器学习·数学建模·动态规划·图论·抽象代数
学究天人9 天前
数学公理体系大全:第五章 序数与基数理论:超限算术与集合的大小
人工智能·线性代数·算法·机器学习·数学建模·原型模式
学究天人9 天前
数学公理体系大全:第六章 选择公理的等价形式及证明
人工智能·线性代数·算法·机器学习·数学建模·概率论·原型模式
逻辑君10 天前
认知神经科学研究报告【20260112】
人工智能·深度学习·数学建模·量子计算
学究天人10 天前
数学公理体系大全:第一章 命题逻辑:真值之舞
人工智能·算法·机器学习·数学建模·动态规划·图论·抽象代数
学究天人10 天前
数学公理体系大全:Comprehensive Collection of Mathematical Axiom Systems(补充卷9)
人工智能·线性代数·算法·数学建模·动态规划·原型模式·抽象代数