How can i use pushbutton callback in opening function callback?

3 ビュー (過去 30 日間)
Nithya
Nithya 2014 年 3 月 11 日
コメント済み: Nithya 2014 年 3 月 12 日
I have a very long script file.But inorder to fix it in GUI, i have divided it into small functions. The program starts with GUI and few functions are written in opening function. When i click on push button callback function, i want one function to be called. But when i do this it gives me error. I think the values inside variables are not reaching the function because it gives me errors related to undefined variable, etc. What is the solution to this problem.
  1 件のコメント
Chandrasekhar
Chandrasekhar 2014 年 3 月 11 日
check if the corresponding callback function for the push button is being called or not

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

回答 (1 件)

Dishant Arora
Dishant Arora 2014 年 3 月 11 日
Those variables are local to the opening function and thus the scope is limited to opening function only. See this How can I share data between callback functions in my GUI(s)?
  1 件のコメント
Nithya
Nithya 2014 年 3 月 12 日
it doc helped me.. but i have a doubt is it possible to create a gui fn with input paramters and without output parameters? I tried,
function varargout = gui3(actualv, Lsoftv, EVnew, EVold,I1)
and the error i got was:
Undefined variable varargin.
Error in gui3 (line 42) gui_mainfcn(gui_State, varargin{:});

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

カテゴリ

Help Center および File ExchangeMigrate GUIDE Apps についてさらに検索

Community Treasure Hunt

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

Start Hunting!

Translated by