Got Questions? Get Answers.
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:
GUI error using radiobuttons

Subject: GUI error using radiobuttons

From: Els

Date: 21 Jan, 2010 14:55:08

Message: 1 of 4

I made a very simple GUI, with 2 edit boxes (for input and output directories) and 3 radiobuttons. The user has to choose one of these buttons, and then press calculate.

So far it all works, the output files go to the entered output directory.

But after the first run, when I press another radiobutton (without pressing calculate) I get an error.

Saying: Undefined function or method 'dGemric_to_3D' for input arguments of type
'struct'.

Can anyone say me what is going wrong?

Subject: GUI error using radiobuttons

From: Nathan

Date: 21 Jan, 2010 18:08:13

Message: 2 of 4

On Jan 21, 6:55 am, "Els " <y.e.t.reeuw...@student.utwente.nl> wrote:
> I made a very simple GUI, with 2 edit boxes (for input and output directories) and 3 radiobuttons. The user has to choose one of these buttons, and then press calculate.
>
> So far it all works, the output files go to the entered output directory.
>
> But after the first run, when I press another radiobutton (without pressing calculate) I get an error.
>
> Saying: Undefined function or method 'dGemric_to_3D' for input arguments of type
> 'struct'.
>
> Can anyone say me what is going wrong?

Not knowing what dGemric_to_3D is or what any of your code looks like,
unfortunately I cannot say what is going wrong.

Please provide more information.

-Nathan

Subject: GUI error using radiobuttons

From: Steven Lord

Date: 21 Jan, 2010 18:34:47

Message: 3 of 4


"Els " <y.e.t.reeuwijk@student.utwente.nl> wrote in message
news:hj9psb$q5l$1@fred.mathworks.com...
>I made a very simple GUI, with 2 edit boxes (for input and output
>directories) and 3 radiobuttons. The user has to choose one of these
>buttons, and then press calculate.
>
> So far it all works, the output files go to the entered output directory.
>
> But after the first run, when I press another radiobutton (without
> pressing calculate) I get an error.
> Saying: Undefined function or method 'dGemric_to_3D' for input arguments
> of type
> 'struct'.
>
> Can anyone say me what is going wrong?

If I had to guess, I'd say either you made a typo in the name of the
function that you're calling in the radiobutton's callback, or the
dGemric_to_3D function is in a directory not on the path, that directory was
your current working directory for your first run, but it is not for the
second run because you CDed away from it.

In the former case, fix your typo. In the latter case, either don't CD out
of the directory containing dGemric_to_3D, make certain you CD back into
that directory once you've finished your work in that other directory, or
add the directory containing dGemric_to_3D to your path using File -> Set
Path or PATHTOOL.

--
Steve Lord
slord@mathworks.com
comp.soft-sys.matlab (CSSM) FAQ: http://matlabwiki.mathworks.com/MATLAB_FAQ

Subject: GUI error using radiobuttons

From: Els

Date: 21 Jan, 2010 19:18:05

Message: 4 of 4

Yes, this was it, I changed my directory to another path as where my m-function was in.
By using the pwd command, in the first function, I changed my directory back to the original work directory....and did the trick!!! Thanks a lot!

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