Matlab does not save the variable in each loop
1 次查看(过去 30 天)
显示 更早的评论
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 个评论
采纳的回答
per isakson
2020-4-20
you need to pre-allocate Tout, something like
N = appropriate value
Tout = cell(1,N);
before assigning values
更多回答(0 个)
另请参阅
类别
在 Help Center 和 File Exchange 中查找有关 Matrices and Arrays 的更多信息
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!