How can I make a editbox show what is happening in the command window?

조회 수: 1 (최근 30일)
Hi
I need help to make a gui editbox code, that allows the numbers in the command window yo be shown in a editbox during the calculation.
I've have a video of the problem, select HD and full screen and you can see my mouse showing what numbers I want to appear in my editbox.
Im NOT looking for the final number, because I cant wait until the calculation is done and then make the command window send the number to my editbox. I need it to do it while its calculating. Due to the fact that it's a iterative process that I have to cancel if the numbers are two far apart.
If no one can help, can anyone help me with a homepage where I can buy the expert help I'm seeking.?

채택된 답변

Sean de Wolski
Sean de Wolski 2013년 4월 10일
What is happening that is causing the numbers to show up at the command window?
Whatever function is printing this should be called from within the GUI and returning the values so that the GUI can update the 'String' of the edit boxes.
If it's user interaction in the command window, there is not a documented way to do this.
  댓글 수: 3
Image Analyst
Image Analyst 2013년 4월 11일
Why can't you just put a set(handles.textLabel, 'String', yourstring) inside your loop? You'll probably also need a drawnow.
Mikkel
Mikkel 2013년 4월 11일
편집: Mikkel 2013년 4월 11일
Ive just tried that, this is one of the loops. And this is the error I get. (I've paste the first loop of my program in the bottom.)
Error using set
Ambiguous property found.
Object Name : uicontrol
Property Name : 'H'.
This is my code for the first loop case.
<while stop>0
switch Beregning %#ok<*ALIGN>
case 1
while e_while<0
H
[dr,E1,E2,z1,z2,F]=Fit_dr(Dybde,e_jord,f_jord,h_ult,H);
dr,E1,E2,z1,z2,F ;
[Hd,Vd,Md]=Beregn_Hd_Vd_Md(d,D,E1,E2,z1,z2,F,H,Vm,M); %Beregning af Hd, Vd, Md
e=Md/Vd;
if e>D/2
H=H-10;
M=H*h_ult;
e_while=-1;
set(handles.result, 'H','')
elseif e<=0
H=H+10;
M=H*h_ult;
e_while=-1;
set(handles.result, 'H','')
else
e_while=+1;
Beregning=2;
end
end >

댓글을 달려면 로그인하십시오.

추가 답변 (0개)

카테고리

Help CenterFile Exchange에서 Loops and Conditional Statements에 대해 자세히 알아보기

Community Treasure Hunt

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

Start Hunting!

Translated by