Filter löschen
Filter löschen

How do you average vectors in a cell array?

1 Ansicht (letzte 30 Tage)
L'O.G.
L'O.G. am 3 Mai 2022
Kommentiert: Stephen23 am 4 Mai 2022
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?

Akzeptierte Antwort

Voss
Voss am 3 Mai 2022
If they're really all row vectors of the same length like that, then:
mean(vertcat(C{:}))
where C is the cell array.

Weitere Antworten (0)

Kategorien

Mehr zu Multidimensional Arrays finden Sie in Help Center und File Exchange

Produkte


Version

R2021b

Community Treasure Hunt

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

Start Hunting!

Translated by