Clearing the cell array at the end of the loop

조회 수: 3 (최근 30일)
Gopalakrishnan venkatesan
Gopalakrishnan venkatesan 2015년 5월 11일
답변: Thomas Koelen 2015년 5월 11일
I need to clear the cell array at the end of the loop.
data ={'one','two','three'} element = {'four','five','six'}
for a =1:numel(data)
b = data(a);
c = element(b);
d = [b , c]
end
xlswrite('ddd.xls',d)
so after the write operation i need to clear the cell array (i.e d) as the loop will continue after that?
how can i do this?
Thanks a lot

채택된 답변

Thomas Koelen
Thomas Koelen 2015년 5월 11일
At the end of you loop you just put:
d={};
Thomas

추가 답변 (0개)

카테고리

Help CenterFile Exchange에서 Multidimensional Arrays에 대해 자세히 알아보기

Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!

Translated by