フィルターのクリア

xcorr different results on different computers with NaN datasets

1 回表示 (過去 30 日間)
Daniel Morgan
Daniel Morgan 2020 年 6 月 3 日
コメント済み: Daniel Morgan 2020 年 6 月 3 日
I'm currently running a fairly complicated piece of code that is comparing around 70 datasets with each other and returning a correlation matrix that determines how closely correlated each dataset is with the others using the following syntax:
[c,lags] = xcorr(seq1,seq2,maxlag,'coeff');
xcorr is a function from the Signal Processing Toolbox
Several of these datasets do not actually contain data, and have been entered as NaN arrays. The problem comes when I run this code on different computers. On one computer, both the 'c' and 'lag' are returned as NaN arrays. On another computer, they are returned as empty variables. As it is fairly crucial that this code run in exactly the same way on any given computer, it's really important I find out why and how this is happening. Does anyone have any concrete explanations?

回答 (1 件)

the cyclist
the cyclist 2020 年 6 月 3 日
編集済み: the cyclist 2020 年 6 月 3 日
Are the computers running the same version of MATLAB?
Also, there is an xcorr function in base MATLAB. Is it possible that one of the computers does not have the Signal Processing Toolbox installed? (This seems unlikely to be the solution, since it has a different calling syntax.)
What does
which xcorr
give on both computers?
  1 件のコメント
Daniel Morgan
Daniel Morgan 2020 年 6 月 3 日
You got it! It's not my code, and apparently somebody had written a wholely new xcorr function. One computer was using the new code while the other one was using the official MATLAB version.

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

カテゴリ

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

製品


リリース

R2017b

Community Treasure Hunt

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

Start Hunting!

Translated by