Matlab quits after running live script for about 10 minutes.

조회 수: 2 (최근 30일)
Erica Juliano
Erica Juliano 2021년 8월 15일
답변: Daksh 2023년 2월 2일
I've been having problems running one live script of mine for a few days now. The code is set to run through 280 .ncdf files; however, because of the size of the files, I've been running the blocks of code by changing k=1:280 to k =1:100 then k=101:280... etc. I have even tried cutting these segments into groups of 2 towards the end for the larger files.
Even though I'm cutting the amount of information matlab needs to handle, it still is not working. In the largest files, towards the end of the list (files 270-280), matlab will quit and shut down without any error message. The code runs perfectly fine and I don't get errors running it for the smaller files, so it doesn't have to do with the code.
I'm thinking it could have to do with the new update? I just updated my matlab to the newest software (MATLAB R2021a). This has never happened to me before on the other software. If anyone has any thoughts or recommendations PLEASE let me know!!!
  댓글 수: 1
dpb
dpb 2021년 8월 15일
Only way think anybody here can do anything is to have your script and a failing data file...

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

답변 (1개)

Daksh
Daksh 2023년 2월 2일
I understand you're experiencing MATLAB crashing after running a complex file for considerable time. However, without seeing the code it is impossible to suggest a solution. There is no magic "do not crash"-flag, which means that you'll have to debug the code, and maybe set some breakpoints to step through the code line by line. If this is too lengthy, try to enable the diary and display all performed commands:
echo(fullfile(tempdir, 'myEcho.txt'));
diary(fullfile(tempdir, 'myDiary.txt'));
% now run the code again
After MATLAB crashes again, kindly check the event log of the operating system also for a new entry.
If you have found out, where the code crashess, insert some code to stop the execution exactly before the crash, e.g.:
if k==17 && b==47196
keyboard; % -> Breakpoint here
end
Save the variables provided as input for the next step in a MAT file, such that you can examine the reason without the need for the former processing. The next command together with the input data are a useful start point to explain the details here in the forum. Hope this helps!

카테고리

Help CenterFile Exchange에서 Startup and Shutdown에 대해 자세히 알아보기

제품


릴리스

R2021a

Community Treasure Hunt

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

Start Hunting!

Translated by