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 件のコメント
madhan ravi
madhan ravi 2020 年 7 月 6 日
Small illustration might help.

サインインしてコメントする。

回答 (1 件)

Rik
Rik 2020 年 7 月 6 日
Use subindexing, the mean function, and repmat.

カテゴリ

Help Center および File ExchangeOperators and Elementary Operations についてさらに検索

Community Treasure Hunt

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

Start Hunting!

Translated by