The pairwise distances in yIn are arranged in the order 21 31 m1 32 m2 m m 1. For example if you type 2 2 and press Enter you get an answer of 4. ZOut squareform yIn converts yIn a pairwise distance vector of length m m 12 for m observations into ZOut an m -by- m symmetric matrix with zeros along the diagonal.
By using this website you agree to our Cookie Policy.
Likewise if you type 2 pi 63781 and press Enter you get the circumference of the earth in km heres a list of Earth statistics including radius. If that is the case then you can easily find Euclidean distance by the code I have written below. Distance x 2 x 1 2 y 2 y 1 2. For example if you type 2 2 and press Enter you get an answer of 4.