how make mini command window
1 visualización (últimos 30 días)
Mostrar comentarios más antiguos
hi all, anyone know how make mini command window?? i want some output of my program can display in mini command window on same frame with the program..
0 comentarios
Respuestas (1)
Jan
el 17 de Nov. de 2011
"Mini-command-window" implies, that you can start commands from this window. But there is one command window only. Do you want do reduce its size programatically? Then try: FEX: CmdWinTool.
If you only want to display some text:
function FigureHandle = ListText(FigureHandle, Str)
if nargin == 0
FigureHandle = figure;
ListH = uicontrol('Style', 'listbox', 'String', {}, ...
'Min', 0, 'Max', 2, 'Value', [], ...
'Units', 'normalized', ...
'Position', [0, 0, 1, 1]);
set(FigureHandle, 'UserData', ListH);
else
Str = cellstr(Str);
ListH = get(FigureHandle, 'UserData');
Str = cat(1, get(ListH, 'String'), Str(:));
set(ListH, 'String', Str, 'ListBoxTop', length(Str));
end
drawnow;
Now you can call this function like this:
ListFig = ListText;
for i = 1:20
pause(0.5);
ListText(ListFig, datestr(now, 0));
end
0 comentarios
Ver también
Productos
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!