1 Star 1 Fork 2

谭富文/机器学习-微积分

加入 Gitee
与超过 1200万 开发者一起发现、参与优秀开源项目,私有仓库也完全免费 :)
免费加入
文件
该仓库未声明开源许可证文件(LICENSE),使用请关注具体项目描述及其代码上游依赖。
克隆/下载
ch6_3三次函数的定积分-面积图.py 477 Bytes
一键复制 编辑 原始数据 按行查看 历史
TanFuwen 提交于 2022-07-17 21:10 +08:00 . 定积分-面积图形,n次函数
# -*- coding: utf-8 -*-
"""
file:ch6_3三次函数的定积分-面积图
author: Fuwen
time: 2022/7/17 20:40
software:PyCharm
"""
import numpy as np
import matplotlib.pyplot as plt
# ∫(x**2)dx ,F(x) = 1/3 * x**3, x∈[1, 3] # 积分区间
# 被积函数f(x)的系数
a = 1
# 绘制定积分图形
x = np.linspace(0, 5, 1000)
y = a * x**2
plt.plot(x, y)
plt.fill_between(x, y1=y, y2=0, where=(x>=1)&(x<=3), facecolor='lightgreen')
plt.grid()
plt.show()
Loading...
马建仓 AI 助手
尝试更多
代码解读
代码找茬
代码优化
Python
1
https://gitee.com/daydayup20172022/machine-learning---calculus.git
git@gitee.com:daydayup20172022/machine-learning---calculus.git
daydayup20172022
machine-learning---calculus
机器学习-微积分
master

搜索帮助