How do I write in different cell locations each time xlswrite function is executed in a for loop?
조회 수: 1 (최근 30일)
이전 댓글 표시
How do I write in different cell locations each time xlswrite function is executed in a for loop?
댓글 수: 0
채택된 답변
Oleg Komarov
2011년 2월 8일
Specify the range in Excel format:
xlswrite(filename, M, range)
An example (really basic, and optimizable):
for ii = 1:4
% Create random matrix
A = rand(ii);
% toplefts
toplefts = cumsum(0:ii-1)+1;
% Range
range = XLSrange(size(A),[toplefts(ii),1]);
xlswrite('C:\Users\Oleg\Desktop\trial.xlsx',A,'Sheet1',range)
end
Oleg
댓글 수: 0
추가 답변 (1개)
참고 항목
카테고리
Help Center 및 File Exchange에서 Spreadsheets에 대해 자세히 알아보기
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!