Laptop slept for several hours while I was publishing a code. Now Should I stop it from running and start over?

조회 수: 2 (최근 30일)
I am publishing a code that looks like this:
tic
RUN=0; all_obj_values_runs=[];
for t=1:30
RUN=RUN+1
Impnsga2
all_obj_values_runs=[all_obj_values_runs; Objective_values];
end
toc
If I stopped it now will MATLAB give me all the data from the runs that were done so far? or just the data from the final run? how to know if it is running now and not stopped?
  댓글 수: 2
Rik
Rik 2023년 4월 22일
That depends on how you are stopping the process. Did you implement a method to gracefully exit?
And the best way to tell if your code is still running is to look at the lower left corner, where it will either say ready or busy. Another way is to check task manager for resource usage.
ehsan
ehsan 2023년 4월 22일
" Did you implement a method to gracefully exit?"
I don't totally understand what does this mean? how to implement a method like that?

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

답변 (1개)

Walter Roberson
Walter Roberson 2023년 4월 22일
If you were to stop it now, it is most likely that you would get no output.
There is a chance that you just might get a partial output file, possibly truncated at the previous 4 kilobyte boundary.

카테고리

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

Community Treasure Hunt

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

Start Hunting!

Translated by