Mercurial > hg > camir-aes2014
comparison toolboxes/MIRtoolbox1.3.2/MIRToolbox/@mirscalar/corrcoef.m @ 0:e9a9cd732c1e tip
first hg version after svn
author | wolffd |
---|---|
date | Tue, 10 Feb 2015 15:05:51 +0000 |
parents | |
children |
comparison
equal
deleted
inserted
replaced
-1:000000000000 | 0:e9a9cd732c1e |
---|---|
1 function r = corrcoef(x,y) | |
2 | |
3 dx = get(x,'Data'); | |
4 dy = get(y,'Data'); | |
5 fx = get(x,'FramePos'); | |
6 fy = get(y,'FramePos'); | |
7 dr = cell(1,length(fx)); | |
8 for h = 1:length(fx) | |
9 dr{h} = cell(1,length(fx{h})); | |
10 for i = 1:length(fx{h}) | |
11 [f,ix,iy] = intersect(fx{h}{i}',fy{h}{i}','rows'); | |
12 dxi = dx{h}{i}(:,ix,:,:); | |
13 dyi = dy{h}{i}(:,iy,:,:); | |
14 dr{h}{i} = corrcoef(dxi,dyi); | |
15 end | |
16 end | |
17 r = mirmatrix(x,'Data',dr,'Title','Correlation coefficients','Unit',''); |