How to take Correlation coefficient by Ignoring infinite values from vectors keeping the same size?

5 ビュー (過去 30 日間)
I have two vectors X=[1 3 6 inf 4 5 -inf] and Y=[3 5 9 4 inf 23 -inf] with infinite values at random positions in both and want to take corrcoef by keeping the same size but comes out as NaN so how to get a valid value by ignoring infinite values?
  1 件のコメント
David Young
David Young 2016 年 1 月 21 日
I'm not sure what you mean by "keeping the same size". If you ignore the infinite values, the vectors will be length 5 instead of length 7. What answer would you want for the example you give?

サインインしてコメントする。

回答 (0 件)

カテゴリ

Help Center および File ExchangeCorrelation and Convolution についてさらに検索

Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!

Translated by