clear all
FieldName = {'loc1','loc2','loc3','loc4'};
data = rand(8760,4);
dnew = mat2cell(data,eomday(2011, (1:12))*24,size(data,2));
k = cellfun(@(x)num2cell(nonzeros(tril(corrcoef(x),-1))),dnew','un',0);
out = [FieldName(nchoosek(1:numel(FieldName),2)) [k{:}]];
This example demonstrates the monthly mean correlation between each pair location from 4 sites and is expressed in ‘out’. I’m having trouble in plotting this information. I would like to draw a line plot for every pair of locations but where the different line plots have different markers. Also, I would like to insert a legend showing the pair of locations, as denoted in out{1,1} and out{1,2}.
I hope I’ve been clear in expressing my intentions.
If you’re interested in something like this,
You can use the following code: