www.gusucode.com > 支持向量机的Matlab实现,支持多分类,据有GUI操作界面 > code11/MATLAB_svm_gui/data/loadsets2.m
function data = loadsets(varargin) data = get( gcf,'UserData' ); % Clear axes clrchild( data.axes1); % set x and y axes labels xlabel(' x轴'); ylabel(' y轴'); % Get file name with sets file=get( data.pushbutton1,'UserData'); % Load sets trn = load(file.pathname ); trn.I=trn.y; trn.N= 2; trn.K = [length( find(trn.y==1)),length(find(trn.y==2))]; % store loaded sets set( data.axes1,'UserData', trn); % focus on axes axes( data.axes1 ); % plots points ppatterns( trn ); drawnow; function []=clrchild(handle) % function []=clraxis(handle) % % CLRCHILD clears children of an object with the given handle. delete(get(handle,'Children')); return;