Issue using Delete to remove .txt file

9 次查看(过去 30 天)
Hello everyone. I am currently trying to reomove a .txt file before saving data on it to avoid superposition. I am using Delete as defined in it's help page.
My code is as follows:
delete 'WeightData.txt'
save('WeightData.txt', 'weight', '-ASCII','-append');
However, when I execute it I obtain the following "Warning: File not found or permission denied"
I have also tried to delete using the wildcard
delete '*.txt'
However, the error remains the same and the values keep accumulating in the .txt file.
Can someone please advice me on what to do?
Thanks for reading.
  4 个评论

请先登录,再进行评论。

回答(0 个)

类别

Help CenterFile Exchange 中查找有关 Introduction to Installation and Licensing 的更多信息

标签

产品

Community Treasure Hunt

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

Start Hunting!

Translated by