How to stop a program to see all results so far ?

3 ビュー (過去 30 日間)
Cuong
Cuong 2014 年 6 月 25 日
コメント済み: Matt J 2014 年 6 月 25 日
Hi everyone,
I am running a program involved 6 loops. Each loop, the program computes a value. Now it finished computing for the first 5 loops, and continued the last loop. How can I stop the program to the see the results of the first 5 loops, and skip the results of last loop. If I press Ctrl+C all results in the first 5 loops will disappear.
Best,

回答 (1 件)

Matt J
Matt J 2014 年 6 月 25 日
編集済み: Matt J 2014 年 6 月 25 日
  2 件のコメント
Cuong
Cuong 2014 年 6 月 25 日
編集済み: Matt J 2014 年 6 月 25 日
I am not sure this will help me. To be more specific, my program codes are the following lines:
for i=1:6
do something that takes O(N^1000) and return a[i];
% N is a very large number
end
I copied the codes to the command lines and run. The program is still running in my machine, so I can not edit any thing on the codes but I have to wait the program to finish. Is there anyway I stop the execution right now, and see a[1],a[2],..,a[5].
Best
Matt J
Matt J 2014 年 6 月 25 日
If it's running at the command line, I don't know why you think a{1}...a{5} will disappear when you do Ctrl+C.

サインインしてコメントする。

カテゴリ

Help Center および File ExchangeLoops and Conditional Statements についてさらに検索

タグ

Community Treasure Hunt

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

Start Hunting!

Translated by