downsample a vector with different phases ?

3 vues (au cours des 30 derniers jours)
Stéphane Le Tual
Stéphane Le Tual le 16 Nov 2018
Hi,
I have a column vector with 65536 integer data, and out of this vector I want to create a matrix with 32 columns x 2048 rows where each column is a downsampling by 32 of the original vector,, with a phase shift for the starting point going from 0 to 15.
Is there a way to do this without using a loop ?
Thanks,
Stéphane.

Réponse acceptée

Stéphane Le Tual
Stéphane Le Tual le 19 Nov 2018
I found the solution by looking at Matlab blogs and discussions:
reshape(initial 65536 data vector, 32, 2048) is doing the job I needed as in each line I have now datas 1, 33, 65, ..., then 2, 34, 66, ...

Plus de réponses (0)

Community Treasure Hunt

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

Start Hunting!

Translated by