10-27-2011 07:15 AM
Hello all,
Here i attached a program to find the eculidian distance. Is am i doing the right way?
10-27-2011 07:47 AM
There are many ways to do this here's one I find clean. If you make the point cluster a ttpedef it is helpful (no coersion dots) also this typdef can be converted to a 3d coordinate and should still work.
10-27-2011 07:56 AM
They are the same. Since you have an array of clusters you won't be able to get rid of that loop, though. Whether you unbundle and add or convert the cluster to an array and add the array elements - that's really up to you. Doesn't make much of a difference either way.
By the way, watch for coercion dots. Your cluster has SGL elements, but your constants are DBL, so you get automatic upconversion to DBL. This may or may not be what you want.