The following answers in the community might be of relevance to you.
You can try to exclude any NaN's (if present) in your data while computing the correlation coefficients of the data.
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!