Programmatic use of openvar - stoping a function while openvar is open

2 ビュー (過去 30 日間)
Tomy Duby
Tomy Duby 2016 年 10 月 23 日
コメント済み: dasilvarosa 2018 年 3 月 5 日
This is my question: While running a function, I would like the function to stop, open an array using openvar function, let the user examine / modify this array, close openvar and continue with the function. How can I make the function wait while the user had openvar open?
Thanks Tomy

回答 (2 件)

Mark
Mark 2017 年 3 月 20 日
Use openvar and then the keyboard command to go into debugging mode. Despite the other answer, this works perfectly fine in R2016b.
for T=1:5
openvar('T');
disp('Type <a href="matlab:dbcont">dbcont</a> or press F5 to continue');
keyboard;
disp(T);
end

Gowtham Uma M Jaganathan
Gowtham Uma M Jaganathan 2016 年 10 月 27 日
As I understand, you want the execution of code to pause till you complete editing the Variable Editor.
As of MATLAB R2016b the Variable Editor is updated after the execution of the script and hence, you cannot modify the values in the Variable Editor when the script is in executing state. Hence, you cannot pause the execution of the script and then change the values inside the Variable Editor.
  2 件のコメント
Walter Roberson
Walter Roberson 2016 年 10 月 27 日
This answer implies that openvar cannot be meaningfully used in the debugger, since the script is paused while you are in the debugger and you state that openvar will not be updated until after the script executes. If so then this would be a change to openvar that would make openvar nearly useless.
Tomy Duby
Tomy Duby 2016 年 10 月 28 日
I fully agree with Walter.
How can I ask Matworks to extend the functionality of openvar function?
Thanks Tomy

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

カテゴリ

Help Center および File ExchangeEnvironment and Settings についてさらに検索

タグ

Community Treasure Hunt

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

Start Hunting!

Translated by