Thread Subject: MATLAB GUI

Subject: MATLAB GUI

From: HARI

Date: 20 Nov, 2009 05:49:02

Message: 1 of 2

HI,
  I have created a GUI for one one of my requirements. I want the output data that come out from my program to be plotted as i click on a pushbutton. I have created an axes, but when i click to plot its showing error

??? Undefined function or method 'rR' for input arguments of type 'double'.

Error in ==> npc>pushbutton2_Callback at 447
plot(rR(i),cR);

Error in ==> gui_mainfcn at 95
        feval(varargin{:});

Error in ==> npc at 42
    gui_mainfcn(gui_State, varargin{:});

??? Error using ==> npc('pushbutton2_Callback',gcbo,[],guidata(gcbo))
Undefined function or method 'rR' for input arguments of type 'double'.

??? Error while evaluating uicontrol Callback

Subject: MATLAB GUI

From: ImageAnalyst

Date: 20 Nov, 2009 11:17:58

Message: 2 of 2

On Nov 20, 12:49 am, "HARI " <hariss_kr...@yahoo.com> wrote:
> HI,
>   I have created a GUI for one one of my requirements. I want the output data that come out from my program to be plotted as i click on a pushbutton. I have created an axes, but when i click to plot its showing error
>
> ??? Undefined function or method 'rR' for input arguments of type 'double'.
>
> Error in ==> npc>pushbutton2_Callback at 447
>         plot(rR(i),cR);
>
> Error in ==> gui_mainfcn at 95
>         feval(varargin{:});
>
> Error in ==> npc at 42
>     gui_mainfcn(gui_State, varargin{:});
>
> ??? Error using ==> npc('pushbutton2_Callback',gcbo,[],guidata(gcbo))
> Undefined function or method 'rR' for input arguments of type 'double'.
>
> ??? Error while evaluating uicontrol Callback

------------------------------------------------------------------
Set a breakpoint at the plot() line. Then look in the workspace
panel. You'll find out that your variable rR is no longer in scope by
the time you get to your call to plot(). You'll have to use
getappdata & setappdata, or make it global, or a variety of other
methods, to make sure it's in scope in the pushbutton callback.

Tags for this Thread

Add a New Tag:

Separated by commas
Ex.: root locus, bode

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.

rssFeed for this Thread

Contact us at files@mathworks.com