Matlab Mean over same-indexed elements across cells -


I have a cell array of 53 different (40,000 x 2000) sparse matrix, I have to take the mean from the third dimension, so that the example Elements of (2,5) are average in 53 cells. It should output a single (33,000 x 2016) output. I think there should be a way to do this with the cellphone (), but I am not able to write the function that works across cells on the inside signs of the cell.

You can change the index and values ​​of non-orroo entries from sparse matrix, and then automatically You can use the sparse to obtain the amount in a rare form:

  myCell = {spurs ([0 1; 2]), sparse ([3; 4 0])}; % // Example C = numel (myCell); M = cell (1, c); % // preallocate n = cell (1, c); V = cell (1, c); For C = 1: C [mn v] = find (myCell {c}); % // rows, columns, and values ​​of nonzero entries M {c} = m '; N {c} = n. '; V {c} = V. '; End result = Spurs ([M {:}], [N {:}], [V]: / c; Repeat indices  
'// "sparse"

Comments

Popular posts from this blog

import - Python ImportError: No module named wmi -

Editing Python Class in Shell and SQLAlchemy -

lua - HowTo create a fuel bar -