How to add values to an existing *.dat file?

Hello to all, I am sorry if this topic has been discussed earlier, but I could not find it... Can you please give me an idea how to add (record) value to an existing my_datta.dat file, created as csvwrite file. I would like to add values every time when I change the input datta, and not to overwrite the file. Thanks!

 Accepted Answer

csvwrite() calls dlmwrite() with ',' as the delimiter. You can call dlmwrite() directly, in which case you could use
dlmwrite(filename, M, '-append')

More Answers (0)

Community Treasure Hunt

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

Start Hunting!