dlmwrite Problem Opening in Excel

I have a loop that generates 1000 points of data for each iteration. I would like to write the data from each iteration into a delimited file that is easily read with excel. I have been attempting to use various forms of dlmwrite:
dlmwrite('Data', D, '-append', 'roffset', r, 'coffset', k, 'newline', 'pc');
However, the problem I am running into is that when i open the file in Excel, the first set of data is in the correct position, beginning at the top of the sheet, but the consecutive sets of data all begin at the row BELOW the end of the last data set. This leads to a very difficult to read excel file, that is several thousand rows deep. The column offset is working fine, but the row function seems to be unable to start at the top of the table. I have tried setting the row offset to -1000 to compensate, but that doesn't have any effect.
Opening the data file in wordpad gives the same result, the data beyond the first iteration does not start at the top of the page.
The frustrating part is that using
dlmwrite(filename, M, 'D', R, C);
does put the looped data at the top of the sheet, and in the correct column, but it erases all the previous data in the file due to the lack of '-append'.
Is there a workaround for this? Or am I using dlmwrite incorrectly?

Réponses (0)

Question posée :

le 24 Oct 2011

Community Treasure Hunt

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

Start Hunting!

Translated by