% gets the correlation for the whole group function result = TotCorr(indata) result = CorrOfferSize(indata,1); for x = 2:28 %result = cat(1,result,CorrOfferSize(indata,x)); end [temp1,temp2] = sort(result(:,1)); result = result(temp2,:); s = size(result); s = s(1); result = corr(result(:,1),result(:,2)); c = 1;