1 Star 1 Fork 2

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

加入 Gitee
与超过 1200万 开发者一起发现、参与优秀开源项目,私有仓库也完全免费 :)
免费加入
文件
该仓库未声明开源许可证文件(LICENSE),使用请关注具体项目描述及其代码上游依赖。
克隆/下载
ch6_4常数的定积分.py 477 Bytes
一键复制 编辑 原始数据 按行查看 历史
TanFuwen 提交于 2022-07-17 21:10 +08:00 . 定积分-面积图形,n次函数
# -*- coding: utf-8 -*-
"""
file:ch6_4常数的定积分
author: Fuwen
time: 2022/7/17 20:50
software:PyCharm
"""
import numpy as np
import matplotlib.pyplot as plt
# 被积函数为常数-4, ∫(4)dx, F(x) = 4*x
# 积分区间[0,3]
# 被积函数的系数
c = -4
# 绘制定积分图形
x = np.linspace(0, 4, 1000)
y = [c for x in x]
plt.plot(x, y )
plt.fill_between(x, y1=y, y2=0, where=(x>=0)&(x<=3), facecolor='lightblue')
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

搜索帮助