Borrar filtros
Borrar filtros

Info

La pregunta está cerrada. Vuélvala a abrir para editarla o responderla.

Optimizing a Sliding Window for Matrix Re-Assignment

1 visualización (últimos 30 días)
Al Capwn
Al Capwn el 29 de Oct. de 2015
Cerrada: MATLAB Answer Bot el 20 de Ag. de 2021
I have a matrix, A, which is a massive NxM matrix where N is several millions and M is relatively small. and I would like to do an operation (xcorr() or std(), for example) on a window of this matrix, i:i+x, for all i. However, using for loops ends up taking a lot of time since Matlab and for loops get along like me and my ex wife.
I'm trying to optimize it by creating a new matrix, B composed of the windows of A. For example, if
A=[1 2 3 4 5 6 8 9 10],
and the window size is x=3,
B= [1 2 3
2 3 4
3 4 5
...
8 9 10]
Is there any way to optimize this using only vector/matrix operations in order to speed up processing?

Respuestas (0)

La pregunta está cerrada.

Community Treasure Hunt

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

Start Hunting!

Translated by