Discover MakerZone

MATLAB and Simulink resources for Arduino, LEGO, and Raspberry Pi

Learn more

Discover what MATLAB® can do for your career.

Opportunities for recent engineering grads.

Apply Today

Thread Subject:
guide: initialize values of sliders

Subject: guide: initialize values of sliders

From: Kai

Date: 8 Jan, 2009 11:19:11

Message: 1 of 3

Hello,

I'm using guide to create a MATLAB gui. at witch position in the
corresponding .m-file can I define the initial values of my objects?

code-flow in my file is like:

function varargout = gui(varargin)

function gui_OpeningFcn(hObject, eventdata, handles, varargin)

function varargout = gui_OutputFcn(hObject, eventdata, handles)

function slider1_Callback(...)

Thanks for help,
Kai

Subject: guide: initialize values of sliders

From: Jiro Doke

Date: 8 Jan, 2009 12:54:02

Message: 2 of 3

Kai <invalid@invalid.invalid> wrote in message <6sm5pfF73d9fU1@mid.dfncis.de>...
> Hello,
>
> I'm using guide to create a MATLAB gui. at witch position in the
> corresponding .m-file can I define the initial values of my objects?
>
> code-flow in my file is like:
>
> function varargout = gui(varargin)
>
> function gui_OpeningFcn(hObject, eventdata, handles, varargin)
>
> function varargout = gui_OutputFcn(hObject, eventdata, handles)
>
> function slider1_Callback(...)
>
> Thanks for help,
> Kai

Kai,

Either set it in the .fig file (via the Property Inspector of the component) or use the CreateFcn of the component.

jiro

Subject: guide: initialize values of sliders

From: Kai

Date: 8 Jan, 2009 13:07:48

Message: 3 of 3

Jiro Doke wrote:

> Kai <invalid@invalid.invalid> wrote in message
> <6sm5pfF73d9fU1@mid.dfncis.de>...
>> Hello,
>>
>> I'm using guide to create a MATLAB gui. at witch position in the
>> corresponding .m-file can I define the initial values of my objects?
>>
>> code-flow in my file is like:
>>
>> function varargout = gui(varargin)
>>
>> function gui_OpeningFcn(hObject, eventdata, handles, varargin)
>>
>> function varargout = gui_OutputFcn(hObject, eventdata, handles)
>>
>> function slider1_Callback(...)
>>
>> Thanks for help,
>> Kai
>
> Kai,
>
> Either set it in the .fig file (via the Property Inspector of the
> component) or use the CreateFcn of the component.
>
> jiro

CreateFcn is the one I was looking for. thanks!

Tags for this Thread

What are tags?

A tag is like a keyword or category label associated with each thread. Tags make it easier for you to find threads of interest.

Anyone can tag a thread. Tags are public and visible to everyone.

Contact us