Borrar filtros
Borrar filtros

xcorr different results on different computers with NaN datasets

1 visualización (últimos 30 días)
Daniel Morgan
Daniel Morgan el 3 de Jun. de 2020
Comentada: Daniel Morgan el 3 de Jun. de 2020
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?

Respuestas (1)

the cyclist
the cyclist el 3 de Jun. de 2020
Editada: the cyclist el 3 de Jun. de 2020
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 comentario
Daniel Morgan
Daniel Morgan el 3 de Jun. de 2020
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.

Iniciar sesión para comentar.

Productos


Versión

R2017b

Community Treasure Hunt

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

Start Hunting!

Translated by