help with uicontrol pushbutton

조회 수: 4 (최근 30일)
Adnan Kantemur
Adnan Kantemur . 2018년 3월 20일
답변: Gayatri Menon . 2018년 4월 9일
Hi there,
I am trying to create a gui without using guide. I have 2 tables and 2 push buttons on my gui panel. 1 table has fix number of row and column. However, number of column for the other table will change with user input(row is fixed to 6). Based on the data in the tables, I will do some calculation whenever user press the "calculate" push button. Problem starts with calculate push button. I got "Undefined function or variable 't'." error, whenever I want to get the data from tables.( t is name of the one table) . I attached my .m file.

답변 (1개)

Gayatri Menon
Gayatri Menon 2018년 4월 9일
The pushbutton_callback don't have access to 't'.You could find the handle of the table using "findobj" and then use this handle as per your usecase.
function pushbutton_Callback(hObject, eventdata)
Please refer the below link for more information:
Hope the above helps.


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