NaN result on xcorr?
Show older comments
Hello everyone. I am trying to use both xcorr(var1,var2,0,'coeff' and corrcoef in order to get a correlation coefficient of two vectors (I want to see how "similar" they are).
The thing is, sometimes I need to insert a vector of zeros into that calculation and the I get NaN as a result.
It is very important for me to be able to correlate between a vector of zeros and a vector of really small numbers ( both of same length, of course), and get a relatively good correlation between the two (relative to a vector of ones with a vector of small numbers, for example).
Accepted Answer
More Answers (0)
Categories
Find more on Correlation and Convolution in Help Center and File Exchange
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!