How is it possible to find the correlation between vectors of different lengths? For example:
clear all
time1 = 1 + (365-1).*rand(1,12);
time2 = 1 + (365-1).*rand(1,24);
data1 = 1 + (20-1).*rand(1,12);
data2 = 1 + (20-1).*rand(1,24);
usually I would find the correlation with:
R = corrcoef(data1,data2);
but the vectors need to be the same lengths! How would I achieve this?
If your vectors are signals sampled at different frequencies as you stated above in a comment, and if for both of the signals you are above the Nyquist Rate, you can upsample/downsample hence interpolate/decimate the discrete time signal without losing any information. Then you can use the standard correlation measure.