MATLAB: Tortuosity of blood vessels

blood vesselImage Processing Toolboxtortuosity

Hi all,unnamed.jpg
I need to find the tortuosity index of a skeletonized blood vessel (attached text file for x y coordinates) using total squared curvature approach. it's a bit difficult for a matlab beginner like me. I do not have any experience with this kind of equation at all. Can anyone help me creating a function just for this purpose? Thanks