Issue using Delete to remove .txt file

조회 수: 15 (최근 30일)
Jaime De La Mota Sanchis
Jaime De La Mota Sanchis 2020년 1월 29일
댓글: Walter Roberson 2022년 4월 25일
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
Yifan Xu
Yifan Xu 2022년 4월 25일
i have the same issue
Walter Roberson
Walter Roberson 2022년 4월 25일
delete('WeightData.txt')

댓글을 달려면 로그인하십시오.

답변 (0개)

카테고리

Help CenterFile Exchange에서 Whos에 대해 자세히 알아보기

태그

제품

Community Treasure Hunt

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

Start Hunting!

Translated by