Effacer les filtres
Effacer les filtres

How to create a sliding window for a matrix with some overlapping elements?

1 vue (au cours des 30 derniers jours)
Gianluca Ligresti
Gianluca Ligresti le 5 Déc 2018
Hi all,
I have a very large matrix with 200.000 rows and 300 columns. I need to apply some processing to a window of 5000 elements and this window has to shift every 10 elements. I mean: at the first iteration I want a window with all the columns (300) and the rows from 1 to 5000, then at the second iteration I want all the columns (300) and the rows from (1+shift) to (5000+shift) so from the row 11 to the row 5011; at the third iteration from ow 21 to row 5021 and so on until I finish to read my total matrix of dimensions 200.000 x 300.
I've read on the Web about some solutions, they all work but only with small matrices. Is there a way to obtain the result I ask for with a good time of response from Matlab?
I mean that I tried to put shift = 1000 instead that shift = 10 inside my code and Matlab gives me a result in 1 minute, so with shift = 10 I have to wait a LOT.
Thank you very much for your answers

Réponses (0)

Catégories

En savoir plus sur Matrix Indexing dans Help Center et File Exchange

Community Treasure Hunt

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

Start Hunting!

Translated by