Compute cosine similarity between vectors 'x' and 'y'


Updated Tue, 16 May 2017 15:37:41 +0000

View License


Cs = getCosineSimilarity(x,y)

Compute Cosine Similarity between vectors x and y.
x and y have to be of same length. The interpretation of
cosine similarity is analogous to that of a Pearson Correlation

Cite As

Ruggero G. Bettinardi (2023). getCosineSimilarity(x,y) (, MATLAB Central File Exchange. Retrieved .

MATLAB Release Compatibility
Created with R2009a
Compatible with any release
Platform Compatibility
Windows macOS Linux
Find more on Test and Measurement in Help Center and MATLAB Answers
Tags Add Tags

Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!
Version Published Release Notes