How do you average vectors in a cell array?

1 回表示 (過去 30 日間)
L'O.G.
L'O.G. 2022 年 5 月 3 日
コメント済み: Stephen23 2022 年 5 月 4 日
A cell array of vectors of type double, say:
1 x 10000
1 x 10000
1 x 10000
How do you average the values into one array 1 x 10000?

採用された回答

Voss
Voss 2022 年 5 月 3 日
If they're really all row vectors of the same length like that, then:
mean(vertcat(C{:}))
where C is the cell array.
  1 件のコメント
Stephen23
Stephen23 2022 年 5 月 4 日
mean(vertcat(C{:}),1)
% ^ robust

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

その他の回答 (0 件)

カテゴリ

Help Center および File ExchangeMultidimensional Arrays についてさらに検索

製品


リリース

R2021b

Community Treasure Hunt

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

Start Hunting!

Translated by