finction datestr and writetable
2 次查看(过去 30 天)
显示 更早的评论
I want to save the file to the folder I created with datestr.
But the path path always shows an error, how can I modify it?
![擷取.JPG](https://www.mathworks.com/matlabcentral/answers/uploaded_files/248167/%E6%93%B7%E5%8F%96.jpeg)
0 个评论
采纳的回答
Nicolas B.
2019-11-14
May I ask you to use the "code" function of this website to add your code instead of a picture. It makes it easier for us to copy your code if necessary.
In your code, I see that the filename of your output file is t/a.txt. Then, except if you have a folder named t, it would not work. So my first suggestion would be to get the real path:
writetable(T, fullfile(t, 'a.txt'), 'Delimiter', ' ', 'writevariablenames', false);
Second, the line with fullfile in your code is useless because fullfile is supposed to be used to merge a full filename path. So you can skip it.
更多回答(0 个)
另请参阅
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!