Statistical comparison of two 2d matrices, corr2 or xcorr or other?
12 visualizaciones (últimos 30 días)
I'm trying to compare 2d matrices (just 2 at a time) of identical sizes to see if they are similar, what I mean by similar is that high and low values appear in similar areas in each matrix (i.e. they share a similar distribution but not necessarily similar values, although I'm open to an approach which would require similar values too).
Currently I'm using corr2 but this seems the results of this don't always seem to be the most obvious; matrices which I think are very similar don't get very high correlations but matrices which are only vaguely similar get high(ish) correlation values. I think part of the problem is that my matrices contain a lot of zero values, so it only takes some low numbers in the right places to create in implied correlation.
I was wondering if anybody knows of or could recommend an alternative approach. I was wondering about xcorr, from the description it seems to do what I want, but in practice I can't really understand it, I'm not sure why it returns a matrix the same size as the inputs or what the values contained are.
Ideally I would like a test which takes two matrices of identical size and ouputs a single value signifying their similarity.
Thanks in advance for any help,