Contact
CoCalc Logo Icon
StoreFeaturesDocsShareSupportNewsAboutSign UpSign In
| Download
Views: 1735
Image: ubuntu1804
Kernel: Python 2 (system-wide)

import matplotlib.pyplot as plt import numpy as np #1 x = np.linspace(0,0.01,1000) y = np.exp(x) plt.plot(x,y,'b') y = x + 1 plt.plot(x,y,'r') #הגרפים כמעט זהים
[<matplotlib.lines.Line2D at 0x7f0267c84350>]
Image in a Jupyter notebook
x = np.linspace(0,0.1,1000) y = np.sin(x) plt.plot(x,y,'b') y = x plt.plot(x,y,'r') #הגרפים זהים
[<matplotlib.lines.Line2D at 0x7f0265bf8890>]
Image in a Jupyter notebook
import math x = np.linspace(0,0.1,1000) y = np.cos(x) plt.plot(x,y,'b') y = x*0 der = [np.cos(0),-np.sin(0),-np.cos(0),np.sin(0)] for i in range(2): y += der[i%4]*(x**i)/math.factorial(i) plt.plot(x,y,'r')
[<matplotlib.lines.Line2D at 0x7f02656cb9d0>]
Image in a Jupyter notebook