Hello, can anyone help me to write 'vectorized' code to compute the autocorrelation of each row of a matrix without using a for loop? My current code computes the autocorrelation of the rows like this:
b(m,:)=xcorr( a(m,:) );
This is slow and inefficient. There must be a better way? Thanks, -Cody
Is the issue here that you really need to make this code run faster, or is it that you are just hoping to find a more elegant (e.g. vectorized) way to accomplish this task without resorting to afor loop?
How much time is it taking to run this code now? How fast do you need it to be?