Variable numerical value in editbox (gui).

조회 수: 2 (최근 30일)
Roei O
Roei O 2016년 1월 29일
답변: Ingrid 2016년 1월 29일
Hi everybody! , I'm building a GUI and i have had to build my own function to calculate min/max values and compare it to the one matlab has to offer(peakdet). I'm using tic/toc to make the comparison (their numerical values are stored in a variable, calling it a and b for the example). I would like to display those variables value in an editbox in my gui. Could you please advise on how to do that? a link to a code or something like that will be much appreciated! Thanks!

채택된 답변

Ingrid
Ingrid 2016년 1월 29일
If you only want to update the values through this function I would advise against the use of an editbox as this might cause you to accidentally change the value yourself. You could just use a textbox and use it's handle to set the string value of this textbox after you have calculated it
so in your callback function add:
set(handles.text1,'String',num2str(a));
set(handles.text2,'String',num2str(b));

추가 답변 (0개)

카테고리

Help CenterFile Exchange에서 Migrate GUIDE Apps에 대해 자세히 알아보기

Community Treasure Hunt

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

Start Hunting!

Translated by