How to create a sliding window for a matrix with some overlapping elements?
1 visualizzazione (ultimi 30 giorni)
Mostra commenti meno recenti
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
0 Commenti
Risposte (0)
Vedere anche
Categorie
Scopri di più su Matrix Indexing in Help Center e File Exchange
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!