Hi guys
I would appreciate a bit of help.
I have a very simple piece of code, made almost entirely with guide in Matlab 6. I cannot get the graph inside the gui to draw anything. Instead a new figure window is opened.
it is driving me crazy….
this is the code:
function varargout = ff(varargin)% FF Application M-file for ff.fig
% FIG = FF launch ff GUI.
% FF('callback_name', ...) invoke the named callback.
% Last Modified by GUIDE v2.0 20-May-2014 00:05:48
if nargin == 0 % LAUNCH GUI
fig = openfig(mfilename,'reuse'); % Use system color scheme for figure:
set(fig,'Color',get(0,'defaultUicontrolBackgroundColor')); % Generate a structure of handles to pass to callbacks, and store it.
handles = guihandles(fig); guidata(fig, handles); if nargout > 0 varargout{1} = fig; endelseif ischar(varargin{1}) % INVOKE NAMED SUBFUNCTION OR CALLBACK
try [varargout{1:nargout}] = feval(varargin{:}); % FEVAL switchyard
catch disp(lasterr); endend% --------------------------------------------------------------------
function varargout = pushbutton1_Callback(h, eventdata, handles, varargin)% Stub for Callback of the uicontrol handles.pushbutton1.
axes(handles.axes1)x=0:2*pi/1000:2*pi;x=sin(100*x);plot(x);%if I do the following command the property changes to on so something is working.
%set(handles.axes1,'XGrid','on')
Best Answer