Initialization code not loading from GUI

조회 수: 13 (최근 30일)
Amed
Amed 2014년 1월 26일
댓글: Amed 2014년 1월 26일
Hi people. I have been learning MATLAB and have stumbled on an issue I imagine is an easy fix.
I have been developing a GUI code and ideally I want it to function so that when I double-click the project.fig file it will execute all the coding in the initialization. Basically these subfunctions:
gui_State = struct('gui_Name', mfilename, ...
'gui_Singleton', gui_Singleton, ...
'gui_OpeningFcn', @DynoData_OpeningFcn, ...
'gui_OutputFcn', @DynoData_OutputFcn, ...
'gui_LayoutFcn', [] , ...
'gui_Callback', []);
The code executes fine if I run it from the editor but they do not run if I run it from the directory folder next to the command window. Why?

채택된 답변

Amit
Amit 2014년 1월 26일
Becuase project.fig file is just the figure file. There must be a project.m file. That is the executable file. You run that, it will be very similar to running the figure from the editor.
  댓글 수: 3
Amit
Amit 2014년 1월 26일
In the command window, type project (as that is your GUI fig name and the m file associated with it's name)
Amed
Amed 2014년 1월 26일
Thank you sir.

댓글을 달려면 로그인하십시오.

추가 답변 (0개)

카테고리

Help CenterFile Exchange에서 Other Formats에 대해 자세히 알아보기

Community Treasure Hunt

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

Start Hunting!

Translated by