- 連続性についてお絵かきして体感してみたい。
- lecture18.pdf (dartmouth.edu)
- 右連続、左連続
- 区分連続関数とは、いくつかの点を除いて、ところどころ連続である関数
- 右連続かつ左連続である
"""
import numpy as np
import matplotlib.pyplot as plt
from mpl_toolkits.mplot3d import Axes3D
from matplotlib import animation
import math
fig,ax=plt.subplots()
N=500
def h(x):
if x<-3:
return x**2+4*x+3
elif -3<=x<1:
return x+3
elif x==1:
return -2
elif 1<x<=math.log(4):
return math.exp(x)
else:
return math.exp(-x)
x=[1+0.01*(i-N) for i in range(2*N)]
y=[h(x[i]) for i in range(2*N)]
ax.scatter(x,y,label="h(x)")
ax.set_xlabel("x")
ax.set_ylabel("y")
ax.set_title("Piecewise Continuous Function")
ax.legend(loc=0)
plt.show()
"""