How to to solve this issue ?i need guidance

조회 수: 2 (최근 30일)
Rakesh Roshan
Rakesh Roshan 2022년 5월 31일
댓글: Walter Roberson 2022년 5월 31일
I have 22 list of materials and each materials will give..20 simulations..i have to create something thing ..if by chance simulation gets stopped in between ..i have to delete the present material results data where it has stopped and start from that particular material... Count=('count.csv') Count=1 for i= count:22
Lines of codes
If count< 22
dlmwrite('count.csv', count).% Updating the CSV sheet with which material it is getting simulated
Else at this point I am stuck ...what i should do ... so that if simulation gets stopped the results of present material is entirely deleted and from that particular material simulation has started all over again
2018a

답변 (1개)

Walter Roberson
Walter Roberson 2022년 5월 31일
At each point that you are sure you will not need to remove anything more from the file, take a copy of the file. If you find a failure, copy the safe file back over the working file.
  댓글 수: 2
Rakesh Roshan
Rakesh Roshan 2022년 5월 31일
sir i didn't understand can u plz explain with a sample code
Walter Roberson
Walter Roberson 2022년 5월 31일
"i have to delete the present material results data"
Keep two files. Write new data to one of them. At the point where you know you have success, copy that one to the other file. At any point you detect failure, copy the second file back over the first one.

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

카테고리

Help CenterFile Exchange에서 Condensed Matter & Materials Physics에 대해 자세히 알아보기

태그

Community Treasure Hunt

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

Start Hunting!

Translated by