'xcorr()' giving some negative values
2 visualizaciones (últimos 30 días)
Mostrar comentarios más antiguos
I have two arrays A and B both having only positive values with some being zero. I am using c=xcorr(A,B) to get the cross correlation. I would expect the result to be all positive but getting some negative values. What is the reason?
4 comentarios
dpb
el 31 de En. de 2017
Sure
cor(cor<0)=0;
if you feel you must. But, in general, when you use floating point, rounding errors are inherent with the beastie.
Respuestas (0)
Ver también
Productos
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!