Please attach a few photos that show the range of shapes you expect to encounter, and explain what you want to discover based on those shapes. Go here for algorithms on shapes:http://www.visionbib.com/bibliography/contents.html
From the help:"n = norm(v,p) returns the vector norm defined by sum(abs(v)^p)^(1/p), where p is any positive real value, Inf, or -Inf."
So the function would just be a wrapper for norm where v = x2-x1. That should be all you need. It's literally 2 lines of code: a function line and a call to norm() that returns the return value. It even tells you what norm() does so if you didn't want to use the built-in norm(), you could calculate the sum yourself.
Best Answer