GUI push button : when pressed should execute a m-file

Hi I am Vinod. Right now i'm working on preparing a GUI for communication systems as an teaching aid. I have written m-files for all modulation schemes and coding schemes. What i want to do is I want to make GUI. In that GUI i want to have push buttons for each modulation scheme. So, when i press a push button, the corresponding m-file should be executed. That's all i want. Suppose I'm having a program Amplitude modulation Convenam.m. so, if i press the push button of CAM the convenam.m has to be executed. please help me

6 件のコメント

Venkata Jayadeep Kodali
Venkata Jayadeep Kodali 2013 年 5 月 1 日
編集済み: Walter Roberson 2013 年 5 月 1 日
Hi vinod,
Is your doubt rectified.If yes,could you help me please. I am a beginner and don't know how to write a code in a callback function.
function pushbutton37_Callback(hObject, eventdata, handles)
% hObject handle to pushbutton37 (see GCBO)
% eventdata reserved - to be defined in a future version of MATLAB
% handles structure with handles and user data (see GUIDATA)
Walter Roberson
Walter Roberson 2013 年 5 月 1 日
Venkata, what do you want the callback to do?
Venkata Jayadeep Kodali
Venkata Jayadeep Kodali 2013 年 5 月 1 日
@walter I want it to execute a m file or a function. I am communicating with a serial port in that m file.
Venkata Jayadeep Kodali
Venkata Jayadeep Kodali 2013 年 5 月 1 日
@walter I fixed it with the help of another guy. Anyways Thanks. I have one more question. can I change the data of a particular row in a UITABLE after implementing a particular push button. if yes can you give me an example
Walter Roberson
Walter Roberson 2013 年 5 月 1 日
You need to get() the 'data' of the uitable, modify the row that you want changed, and set() the 'data' to be the new version. You cannot just retrieve or store a row (at least not without going to the Java level.)
Venkata Jayadeep Kodali
Venkata Jayadeep Kodali 2013 年 5 月 1 日
You mean I cannot change only a particular row. I have to get the whole data back and change all data and change data which I want. Right ? And if that's the case how to implement in a java level. I know java programming.

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

 採用された回答

Walter Roberson
Walter Roberson 2012 年 1 月 22 日

0 投票

In the callback for the pushbutton, include a line
Convenam
That's all there is to it unless you want to pass parameters in to the program or get results back from the program.

その他の回答 (0 件)

カテゴリ

ヘルプ センター および File ExchangeScope Variables and Generate Names についてさらに検索

Community Treasure Hunt

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

Start Hunting!

Translated by