Last active
July 17, 2022 10:08
-
-
Save sunsided/59e3b6750d7aa03e848ab73c603a1014 to your computer and use it in GitHub Desktop.
Quadratic interpolant for fixed f(x_0), f(x_1) and f'(x_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
syms a b c x_0 x_1 f(x_0) f(x_1) df(x_0) | |
[a, b, c] = solve(... | |
f(x_0) == a*x_0^2 + b*x_0 + c, ... | |
f(x_1) == a*x_1^2 + b*x_1 + c, ... | |
df(x_0) == 2*a*x_0 + b, ... | |
a, b, c); | |
syms q(x) | |
q(x) = simplify(a*x^2 + b*x + c); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment