Why not 'save' but 'dlmwrite' works?

8 visualizzazioni (ultimi 30 giorni)
Cihan Ruan
Cihan Ruan il 5 Feb 2018
I need to write 4 matrices into one file generated from one recursive structure one by one. The 'write' part could be done by using 'dlmwrite''-append' function. Like :
dlmwrite('outputC.txt',twoColumnResultC,'-append');
However, when I want to save those matrices as a .mat file by using 'save' function, like:
save ('C:\Users\SCU\Desktop\Qtree-work\output.mat','twoColumnResultC', '-append');
there goes
'Error using save |Unable to write file output: No such file or directory.'
I tried some solutions like changing the path, using 'fullfill', but still not work. The 'save' function works well independently, so I wonder if the logical structure of my code matters? What is the difference between 'save' and 'dlmwrite'?
Thank you!

Risposte (0)

Tag

Community Treasure Hunt

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

Start Hunting!