Duplicate the element n times for specific dimension

조회 수: 2 (최근 30일)
Ting-Yu Chueh
Ting-Yu Chueh 2020년 7월 6일
답변: Rik 2020년 7월 6일
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