Linking GUI to MATLAB code (m-file)

Hi,
I am trying to create a GUI wherein the user has to input 2 values and the result will be a plot. In short, the m-file should take the input from the GUI and run the code. But I am unable to link the GUI with the m-file. It looks like after saving the .fig it also creates .m file for the GUI. My query where exactly should I place the code (m-file with the plot) in the GUI m.file so that I get the results.
Pardon me for a basic question like this since I am new to matlab.
Waiting for the reply.
Thanks in advance
--Sanjeev

 채택된 답변

Walter Roberson
Walter Roberson 2012년 8월 6일

0 개 추천

Put the code with the plotting routine in a different file. The call to the code would go in the callback of a uicontrol, such as in the callback of a pushbutton if you are using the pushbutton to signal that the plotting should proceed.

추가 답변 (0개)

카테고리

도움말 센터File Exchange에서 Graphics Objects에 대해 자세히 알아보기

Community Treasure Hunt

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

Start Hunting!

Translated by