Using mat2cell
    3 vues (au cours des 30 derniers jours)
  
       Afficher commentaires plus anciens
    
    Sebastian Daneli
 le 9 Jan 2022
  
    
    
    
    
    Commenté : Sebastian Daneli
 le 9 Jan 2022
            I'm sorry, but I can't seem to understand how to use this function.
I have a datamatrix of size 1000x512, and a want to store this as 10 cells, each containing a 100x512 matrix. How do I do this using mat2cell?
0 commentaires
Réponse acceptée
  Walter Roberson
      
      
 le 9 Jan 2022
        datacell = mat2cell(datamatrix, size(datamatrix,1)/10*ones(1,10), size(datamatrix,2) )
This divides datamatrix into 10 cells vertically; the size of the cells is automatically calculated. (The code as written does require that the number of rows is exactly divisible by 10)
Plus de réponses (0)
Voir également
Catégories
				En savoir plus sur Data Import and Management dans Help Center et File Exchange
			
	Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!

