필터 지우기
필터 지우기

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.

추가 답변 (0개)

카테고리

Help CenterFile Exchange에서 Multidimensional Arrays에 대해 자세히 알아보기

제품


릴리스

R2021b

Community Treasure Hunt

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

Start Hunting!

Translated by