Control Gui elements from Java / Mex externally using separate thread ??

Hello, I just want to ask whether it is possible to control / update a Matlab GUI object from Java or Mex without using the parallel computing toolbox. I add first codes to describe what I desires.
% init
hf = figure('unit', 'pixel', 'position', [300 300 300 150]);
tv1 = 0;
tv2 = 0;
ht1 = uicontrol('parent', hf, 'string', num2str(tv1), 'style', 'text', 'unit', 'pixel', 'position', [50 100 150 40]);
ht2 = uicontrol('parent', hf, 'string', num2str(tv2), 'style', 'text', 'unit', 'pixel', 'position', [50 30 150 40]);
% start the external thread to refresh the counter in textbox 1 without
% interrupting
% -------------------------- %
% java / mex here
% -------------------------- %
% refresh the text box 2
while true
tv2 = tv2 + 1;
set(ht2, 'string', num2str(tv2));
pause(0.1)
end

1 件のコメント

Guillaume
Guillaume 2015 年 6 月 8 日
I strongly doubt it. Note that even with multithreaded code, only one thread should ever access the UI.

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

回答 (0 件)

カテゴリ

ヘルプ センター および File ExchangeCall Java from MATLAB についてさらに検索

質問済み:

2015 年 6 月 8 日

コメント済み:

2015 年 6 月 8 日

Community Treasure Hunt

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

Start Hunting!

Translated by