Duplicate the element n times for specific dimension

2 次查看(过去 30 天)
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?

回答(1 个)

Rik
Rik 2020-7-6
Use subindexing, the mean function, and repmat.

类别

Help CenterFile Exchange 中查找有关 Operators and Elementary Operations 的更多信息

Community Treasure Hunt

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

Start Hunting!

Translated by