How to take average of such an array?
    4 Ansichten (letzte 30 Tage)
  
       Ältere Kommentare anzeigen
    
    Prashant Bhagat
 am 18 Aug. 2022
  
    
    
    
    
    Beantwortet: Stephen23
      
      
 am 18 Aug. 2022
            Z =
  6×2 cell array
    {[1 0 2 2 1 1 3 1 1 0]}    {[2 1 0 0 0 1 0 2 0 0]}
    {[2 2 3 3 1 3 3 2 1 0]}    {[2 2 0 0 1 2 0 2 0 0]}
    {[2 3 3 3 2 3 4 2 1 0]}    {[3 5 0 0 1 3 0 3 0 1]}
    {[2 3 3 5 2 3 6 3 1 1]}    {[3 5 1 0 1 4 0 4 0 1]}
    {[2 4 3 5 2 3 6 3 1 2]}    {[4 5 2 0 1 5 0 5 2 2]}
    {[2 5 3 7 3 4 6 3 1 3]}    {[5 5 2 0 3 5 1 6 4 3]}
0 Kommentare
Akzeptierte Antwort
  Stephen23
      
      
 am 18 Aug. 2022
        Z =  {[1,0,2,2,1,1,3,1,1,0],[2,1,0,0,0,1,0,2,0,0];[2,2,3,3,1,3,3,2,1,0],[2,2,0,0,1,2,0,2,0,0];[2,3,3,3,2,3,4,2,1,0],[3,5,0,0,1,3,0,3,0,1];[2,3,3,5,2,3,6,3,1,1],[3,5,1,0,1,4,0,4,0,1];[2,4,3,5,2,3,6,3,1,2],[4,5,2,0,1,5,0,5,2,2];[2,5,3,7,3,4,6,3,1,3],[5,5,2,0,3,5,1,6,4,3]}
M = mean(cell2mat(permute(Z,[1,3,2])),3)
0 Kommentare
Siehe auch
Kategorien
				Mehr zu Multidimensional Arrays finden Sie in Help Center und File Exchange
			
	Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!