Populating a spreadsheet - dlmwrite, '-append' and specifying rows and columns
Afficher commentaires plus anciens
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
Réponse acceptée
Plus de réponses (0)
Catégories
En savoir plus sur Text Files dans Centre d'aide et File Exchange
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!