Hi, I want to know knee point of a curve including the process of by 2nd derivative. Can anyone help by creating the script.
14 views (last 30 days)
Show older comments
I want to calculate knee point of a curve in existing software through 2nd derivative. Can anyone help to create script.
0 Comments
Answers (1)
Star Strider
on 16 Oct 2021
Edited: Star Strider
on 16 Oct 2021
x = linspace(0, 10);
y = exp(-0.1*x) .* sin(x);
D1 = gradient(y) ./ gradient(x);
D2 = gradient(D1) ./ gradient(x);
figure
plot(x, y, x, D1, x, D2)
grid
legend('$y(x)$', '$\frac{dy}{dx}$', '$\frac{d^2y}{dx^2}$', 'Location','best', 'Interpreter','latex')
EDIT — (16 Oct 2021 at 21:22)
I am not certain what the curve is. Additional options (includeing the derivative approach) could be findchangepts or ischange.
.
0 Comments
See Also
Categories
Find more on Interpolation in Help Center and File Exchange
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!