Populating a spreadsheet - dlmwrite, '-append' and specifying rows and columns
이전 댓글 표시
Hello!
I'm trying to use a for loop to populate a spreadsheet with information from a struct, such that it pulls out each piece of information into a separate row.
My problem is arising when I try to use csvwrite - I can't append so it just gets overwritten. I switched to using dlmwrite but am now encountering another problem.
I originally tried this - but it got overwritten each time.
dlmwrite('Filename',A,rownum,1)
dlmwrite('Filename',B,rownum,2)
dlmwrite('Filename',C,rownum,3)
dlmwrite('Filename',D,rownum,4)
I tried adding append in - but then it takes it format differently and comes back with an error stating I have an invalid attribute.
dlmwrite('Filename',A,'-append','delimiter',',',rownum,1)
Error using dlmwrite (line 118)
Invalid attribute tag: 1
Any thoughts on how I can format this so that I can still specify the row and column?
Thank you,
ML
PS. I cant really use xlswrite as I dont know the row names - (it's going to be in the thousands of rows - so Its difficult to call A1324)- unless anyone knows a workaround
채택된 답변
추가 답변 (0개)
카테고리
도움말 센터 및 File Exchange에서 Text Files에 대해 자세히 알아보기
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!