MATLAB: How to save a workspace variable to a .txt file

appendsavetxt

I tried using the 'save' function, but I can't seem to get it to work. I want to append a .txt file by saving a variable "excel" to it. I want to be able to do this repeatedly.
I tried the code
save(saving.txt, excel, '-append-')

Best Answer

save('myFile.txt', 'excel', '-ASCII','-append');
Related Question