>> A = length_opti(1,2,3,-5)
x1: the first ordinate of the first point.
y1: the second ordinate of the first point.
x2: the first ordinate of the second point.
y2: the second ordinate of the second point.
opt - The minimum ordinate of the desired point.
Alireza Shourangiz Haghighi (2020). length_opti(x1,y1,x2,y2) (https://www.mathworks.com/matlabcentral/fileexchange/53660-length_opti-x1-y1-x2-y2), MATLAB Central File Exchange. Retrieved .
Inspired by: K-Fold Cross Validation