Is there a way to open a second command window to displya some numbers and text?

8 ビュー (過去 30 日間)
I know, I can do this using a GUI. But is there another way to do it, especially as no graphics capability is required?
Thanks Tomy Duby

採用された回答

Titus Edelhofer
Titus Edelhofer 2011 年 11 月 8 日
Alternatively you could open some file and use fprintf to output data there. Open the file with some editor during the run of the program ...
Titus

その他の回答 (2 件)

Daniel Shub
Daniel Shub 2011 年 11 月 8 日
Sure, but is is ugly ...
system('matlab -r ''disp(12.01);pause(10);exit''')
  2 件のコメント
Jan
Jan 2011 年 11 月 8 日
I confirm that it is ugly.
Tomy Duby
Tomy Duby 2011 年 11 月 8 日
Does not seem to be working for me. This is what I get:
ans =
disp(12.01);pause(10);exit
>>
and does not close the second Matlab windows after 10 seconds...
Tomy Duby

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


Jan
Jan 2011 年 11 月 8 日
What about opening a figure and inserting a large UICONTROL('Style', 'listbox'). Then you can add messages as strings.
FigH = figure('menubar', 'none');
ListH = uicontrol('Style', 'listbox', ...
'Units', 'normalized', ...
'Position', [0,0,1,1], ...
'String', {}, ...
'Min', 0, 'Max', 2, ...
'Value', []);
for i = 1:10
pause(0.5);
Str = datestr(now, 0);
newString = cat(1, get(ListH, 'String'), {Str});
set(ListH, 'String', newString);
drawnow;
end

カテゴリ

Help Center および File ExchangeEntering Commands についてさらに検索

製品

Community Treasure Hunt

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

Start Hunting!

Translated by