6 lines
165 B
Matlab
6 lines
165 B
Matlab
function [y_inf, x_inf] = inflections(y, x)
|
|
y_switch = switchsign( deriv(deriv(y, x), x) );
|
|
y_inf = nonzeros(y_switch .* y);
|
|
x_inf = nonzeros(y_switch .* x);
|
|
end
|