필터 지우기
필터 지우기

How can I export the results to Excel for all loop steps ?

조회 수: 6 (최근 30일)
omar th
omar th 2022년 4월 30일
댓글: Sulaymon Eshkabilov 2022년 4월 30일
I used this xlswrite('D:\data.xlsx','SINR'); to save the result in excel file but I couldn't save it for all loop steps its always save the last step's result. i would appreciate your help if you could help me with this
thanks in advance
  댓글 수: 1
Sulaymon Eshkabilov
Sulaymon Eshkabilov 2022년 4월 30일
First of all, it is advised to use writematrix() instead of xlswrite due to high efficiency.
Second, if possible, avoid using a loop for efficiency purposes again. If not avoidable, then 'append' option has to be employed - see this simple example code:
for ii = 1:10
x = ii+1;
writematrix([x,ii], 'LOOP_Data.xlsx', 'writemode', 'append');
end

댓글을 달려면 로그인하십시오.

답변 (0개)

카테고리

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

태그

제품


릴리스

R2018a

Community Treasure Hunt

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

Start Hunting!

Translated by