Matlab does not save the variable in each loop
1 vue (au cours des 30 derniers jours)
Afficher commentaires plus anciens
Hi all , using some advices from previously asked questions , I used indexing to append values to a table that I am gonna write on Excel file :
if f1==1
Tout{1}=[filename;Tit]
else
Tout{f1} = [Tout{f1-1};filename;Tit]
end
writetable(Tout{end},'All.xlsx')
But I get the error
Error: Undefined function or variable 'Tout'.
0 commentaires
Réponse acceptée
per isakson
le 20 Avr 2020
you need to pre-allocate Tout, something like
N = appropriate value
Tout = cell(1,N);
before assigning values
6 commentaires
Plus de réponses (0)
Voir également
Catégories
En savoir plus sur Matrices and Arrays 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!