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!