How to find inflection point of a curve

79 visualizaciones (últimos 30 días)
harith larabi
harith larabi el 4 de Oct. de 2022
Comentada: Star Strider el 6 de Oct. de 2022
Hello guys.
I am looking for some information.
Maybe you can help me ?
I need to find the inflection point of a curve.
I know that I can use the second derivative or use the tangent but I don't know how to applicate or calculte it in matlab ?
Here you'll fin the curve
it represent the transition from elastic to plastic domain.
Thank you.
Regards
Harith

Respuesta aceptada

Star Strider
Star Strider el 4 de Oct. de 2022
Editada: Star Strider el 4 de Oct. de 2022
First, use the sgolayfilt function to eliminiate as much of the noise as possible, since taking the derivative will amplify it. The use the gradient function to calculate the numerical derivative, for example:
framelen = 101;
ys = sgolayfilt(y, 3, framelen);
dydx = gradient(ys) ./ gradient(x);
Choose the appropriate value for ‘framelen’ to get the desired result.
EDIT — (4 Oct 2022 at 20:40)
Example —
x = linspace(0.9,1.8, 250); % Create Data
y = exp(-(x-1.3).^2*50)/8 + x +0.005*randn(size(x)); % Create Data
% figure
% plot(x, y)
% grid
ydt = detrend(y,1); % Detrend 'y' To Facilitate Analysis
framelen = 101; % Choose Appropriate Value
ydts = sgolayfilt(ydt, 3, framelen); % Denoise Signal
dydx = gradient(ydts) ./ gradient(x); % Calculate Numerical Derivative
[maxdydx,idxmax] = max(dydx); % Interpolation Index Lower Limit
[mindydx,idxmin] = min(dydx); % Interpolation Index Upper Limit
idxrng = idxmax : idxmin;
inflptx = interp1(dydx(idxrng), x(idxrng), 0) % Find Inflection Point X-Value
inflptx = 1.3014
inflpty = interp1(x, y, inflptx) % Find Inflection Point Y-Value
inflpty = 1.4191
figure
plot(x, y, 'DisplayName','Data')
hold on
plot(inflptx, inflpty, '+r', 'MarkerSize',10, 'DisplayName','Inflection Point')
hold off
grid
xlabel('X')
ylabel('Y')
legend('Location','best')
.
  8 comentarios
harith larabi
harith larabi el 6 de Oct. de 2022
Editada: harith larabi el 6 de Oct. de 2022
Thank you for these really clear answer.
Now it's time for me to find a way, other than matlab to find this point, in Excel for example.
The point of inflection that we found is in my case is the transition from elastic to plastic domain of a material called (RP0.2)
Was a pleasure to talk with you, learned a lot from.
Thank you,
Harith
Star Strider
Star Strider el 6 de Oct. de 2022
My pleasure!
If my Answer helped you solve your problem, please Accept it!
.

Iniciar sesión para comentar.

Más respuestas (0)

Productos

Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!

Translated by