Created
July 4, 2022 03:32
-
-
Save ljmartin/1f55eb3ea76c3a8ed16703cc7bd4d322 to your computer and use it in GitHub Desktop.
a function that looks like y=x at a distance, but smoothly goes to 1 instead of 0.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| def f(x): | |
| return (x**3 + x**2 + x + 1) / (x**2 + x + 1) | |
| x = np.linspace(0,10,100) | |
| plt.plot(x, f(x)) | |
| plt.plot(x,x) |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment