Hello!
Unfortunately, calculating the cosine distance between structures in the current Matlab release of USPEX 10.4 cannot be done. But this operation is implemented in the new preparing python-based USPEX release, which will be available for users pretty soon! In the new version, this operation is straightforward and can be done simply by importing a few functions.
Keep in touch and follow our releases! Good luck and best wishes!