フィルターのクリア

Matlab won't run script file.

5 ビュー (過去 30 日間)
Anna
Anna 2013 年 8 月 4 日
Matlab was working fine until today.
I tried to run a script file and matlab won't even attempt to run it. I know its not that matlab can't find the file because it works exactly 4 times then doesn't any longer. When I press the green run button, F5 or just type the file name matlab does absolutely nothing.
I have tried restarting the program (matlab runs the script 4 times then it just doesn't work), restarting my laptop and went as far as to reinstall the software. This hasn't worked.I am running on windows.
I have noticed its exactly 4 times after restarting the program.
  1 件のコメント
Cedric
Cedric 2013 年 8 月 4 日
When you say "doesn't run any longer", does it mean that MATLAB freezes or that just nothing happens? If there is no freeze, can you type commands in the command window, or run other scripts?

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

回答 (1 件)

Jan
Jan 2013 年 8 月 4 日
編集済み: Jan 2013 年 8 月 4 日
How do you check, that "Matlab does nothing"? Did you set a breakpoint in the first line of the script and stepped through the code?
If the problem is, that you do not see anything, the behavior can easily reproduced by this script:
UD = get(0, 'UserData')
if isempty(UD)
UD = 1;
else
UD = UD + 1;
end
if UD > 4
return;
end
fprintf('Number of runs: %d\n', UD);
set(0, 'UserData', UD);
This looks also, like it runs 4 times only. But could this be useful to solve your problem?! No, a reliable analysis of your problem requires seeing the relevant part of your code which reproduces the effects you see.

カテゴリ

Help Center および File ExchangeGet Started with MATLAB についてさらに検索

Community Treasure Hunt

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

Start Hunting!

Translated by