Duplicate the element n times for specific dimension

2 visualizaciones (últimos 30 días)
Ting-Yu Chueh
Ting-Yu Chueh el 6 de Jul. de 2020
Respondida: Rik el 6 de Jul. de 2020
Dear all,
I have a matix. The size is 22x15x30x4000 (316800000 double)
I would average the elements in last dimension between 1001:3000, and duplicate this value 4000 times in the last dimension. The size is also 22x15x30x4000.
Could anyone help me?

Respuestas (1)

Rik
Rik el 6 de Jul. de 2020
Use subindexing, the mean function, and repmat.

Categorías

Más información sobre Operators and Elementary Operations en Help Center y File Exchange.

Community Treasure Hunt

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

Start Hunting!

Translated by