Loop multiple files from a cell
Afficher commentaires plus anciens
Hi, I am trying to get the nanmean from my data. Firstly I load my files (.mat) into a cell (files_mat). Now files_mat is (19x1) and each cell has a matrix of (10200x13). I would like to get the nanmean from all matrices and each matrix has different names, so I am doing a Loop and the resultas is going to be in a new matrix (res_est).
res_est = NaN(19,13)
for i=1:length(files_mat)
res_est(k,13)=nanmean(files_mat{k,1}.Matriz_A(:,1:13)
end
I get the result for the first matrix, but I would ike to get the nanmean of all matrices successively, the problem is: that I have to change manually the name.
for i=1:length(files_mat)
res_est(k,13)=nanmean(files_mat{k,1}.Matriz_B(:,1:13)
end
Some advice to get the nanmean from all files? Thanks
Réponse acceptée
Plus de réponses (0)
Catégories
En savoir plus sur Structures dans Centre d'aide et File Exchange
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!