Writing last line of each cell
    4 vues (au cours des 30 derniers jours)
  
       Afficher commentaires plus anciens
    
    Leonardo Barbosa Torres dos Santos
 le 6 Avr 2019
  
    
    
    
    
    Réponse apportée : Leonardo Barbosa Torres dos Santos
 le 7 Avr 2019
            Dear, I have a question about write file.
I have a file xxMM. It is a 19x1 cell.
The first cell has 14x6 double. The second cell has 12x6 double.
I would like write a file (double) with only the last line of each cell.
For example, the file is xx.
I would like that xx be a double and that the first line be last line and the six columns of first file (cell) of xxMM. 
The second line of xx be the last line of second file (cell) of xxMM and etc al.
How can I do it ?
thanks advanced
0 commentaires
Réponse acceptée
  Mirlan Karimov
      
 le 6 Avr 2019
        xx=zeros(length(xxMM),6);       
for i=1:length(xxMM) 
   a=xxMM{i};
   xx(i,:)=a(end,:);
end
I think there should be a straight way to access cell data. Please, modify the above code if columns and rows do not match as the question was not clearly stating the data structure
0 commentaires
Plus de réponses (1)
Voir également
Catégories
				En savoir plus sur Whos 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!

