simCos

Cosine of the angles betweeen two set of vectors

Contents

Syntax

Description

cosine = simCos(mat1, mat2) returns the cosine of the angles between two set of vectors mat1 and mat2.

The element at row i and column j of the return matrix is the cosine of the angle between column i of mat1 and column j of mat2.

Example

mat1=rand(2, 3);
mat2=rand(2, 4);
cosine=simCos(mat1, mat2)
cosine =

    0.6048    0.8622    0.9926    0.9887
    0.8677    0.5961    0.9613    0.9688
    0.7748    0.7192    0.9934    0.9963

See Also

distPairwise.


Top page   Next: qcTrain.m   Prev:simSequence.m