Convert a vector from the nan_pdist function into a square matrix or from a square matrix back to the vector form.
y = nan_squareform (x) y = nan_squareform (x, "tovector") y = nan_squareform (x,"tomatrix")
Convert a vector from the pdist function into a square matrix or from a square matrix back to the vector form.
The second argument is used to specify the output type in case there is a single element