Clear Filters
Clear Filters

Mean of a cell array

2 views (last 30 days)
Anampally  Mahesh
Anampally Mahesh on 4 Feb 2024
I have a 10*1 cell array named Data.mat, that each row of it contains a 30*30 matrix. How to calculate the mean of this cell array and obtain a 30*30 matrix? Thanks in advance for your kind help. Regards, Mahesh.

Accepted Answer

Walter Roberson
Walter Roberson on 5 Feb 2024
mean(cat(3, TheCellArray{:}),3)
  1 Comment
Anampally  Mahesh
Anampally Mahesh on 5 Feb 2024
Thank you so much, Walter.
It works very nicely :)

Sign in to comment.

More Answers (0)

Categories

Find more on Matrices and Arrays in Help Center and File Exchange

Community Treasure Hunt

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

Start Hunting!