corrcoef returns matrix of NaNs?
Show older comments
Hello. Any ideas of what would be causing corrcoef to return a matrix of NaNs (with 1 on the bottom right)? Both of my input vectors have large amounts of variance.
Thanks!
5 Comments
Walter Roberson
on 14 Jan 2016
Are there any NaN in your matrix?
Star Strider
on 14 Jan 2016
Based on Conversion of cell containing numbers into a numerical double?, they might not all be numeric. (We do not have the data.)
Andie Dola
on 14 Jan 2016
Walter Roberson
on 14 Jan 2016
Are there any inf ? What does cond() of your two matrices report?
the cyclist
on 15 Jan 2016
Can you attach a *.mat file with your vectors?
Also, one way to debug this would be to trying running corrcoef first on one half your observations. If you do, cut it in half again. (If not, run it on the other half.) This way, you should be able to discover which of your observations are causing the problem.
Answers (0)
Categories
Find more on Descriptive Statistics and Insights 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!