Rob guided me in this regard. i am really thankful to him.
here is the explanation by "Rob".
simmx generates a similarity matrix.
Here's a working implementation:
**broken link removed**
The example puts features, as a spectrogram into D1 and into D2 (complex).
The absolute value of D1 and D2 is calculated using abs() which returns a 1xN matrix/vector. These are turned into feature vectors by the lines:
EA = sqrt(sum(A.^2));
EB = sqrt(sum(B.^2));
Where sum(A.^2) produces a sum of the squares of the columns in spectrogram D1, the square root is then taken by sqrt(). This becomes element 1 of EA and so on.
So now the two feature vectors might look something like:
EA = [80.1460385300246 80.4223209993924 81.5990800955345 79.7304932256879 80.4429133365974 81.2984058463773...]
EB = [80.0308851439760 83.5734299550024 84.8833197962066 81.6646072601757 78.5719852908280 77.4648649544494...]
Then the function
M = (A'*B)./(EA'*EB);
Where A' is the transpose of A is multiplied by B. See here for what this is!
Matrix multiplication - Wikipedia, the free encyclopedia
This is a way of calculating the cosine distance.
This is divided by
(EA'*EB)
And is plotted as the similarity matrix. The code goes on to compute the best path through the matrix.
thanx Rob