Filter löschen
Filter löschen

How to find the average of matrices in a cell??

3 Ansichten (letzte 30 Tage)
Darsana P M
Darsana P M am 26 Mär. 2017
Kommentiert: Jan am 26 Mär. 2017
How to find the average of matrices in a cell. the cell is of size 1x10.
  1 Kommentar
Jan
Jan am 26 Mär. 2017
What do you exactly want? The mean of each array store in the cell? The mean array over all arrays?

Melden Sie sich an, um zu kommentieren.

Antworten (1)

Jan
Jan am 26 Mär. 2017
Depending on what the questions exactly mean:
MeanC = cell(size(C));
for iC = 1:numel(C)
MeanC{iC} = mean(C{iC}); % Or: mean(C{iC}(:)) ?
end
Or:
MeanC = mean(cat(3, C{:}), 3);
if the cell elements are matrices and you want the avarage matrix.
A more precise and maybe more efficient answer is possible, when you explain the wanted operation.

Kategorien

Mehr zu Creating and Concatenating Matrices finden Sie in Help Center und File Exchange

Tags

Community Treasure Hunt

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

Start Hunting!

Translated by