Restart variable from a middle point
조회 수: 1 (최근 30일)
이전 댓글 표시
Hi,
I have a for loop for a variable, let's call it X=linspace(a,b,c);
Now, imagine that I am calculating a variable M that depends on the values of X and suddenly Matlab stops.
How can I be sure that I store M until that point?
How can I restart the loop from the exact point that the calculation stopped?
Thanks in advance!
댓글 수: 0
답변 (1개)
Matt J
2019년 2월 11일
You could save M to a .mat file in every iteration of the loop. That will slow things down, however.
댓글 수: 3
참고 항목
카테고리
Help Center 및 File Exchange에서 Loops and Conditional Statements에 대해 자세히 알아보기
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!