|
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.
|