plotgda.m

来自「通过核来泛化的判别分析(GDA)代码」· M 代码 · 共 28 行

M
28
字号
function PlotGDA(T,L,dataGDA,a,symb);

% plot the T test data (line vectors) into one, or two, discriminant axes.
% a is vector with one, or two elements, discribing the axes
% symb is a string for the plot format (see MatLab plot function for further details)
% L is the learning data (see BuildGDA & SpreadGDA)

% Gaston Baudat & Fatiha Anouar / 21st October 2000 / Exton PA 19341 USA
% Designed under MatLab for Windows version 5.2.0.3084


tmp=length(dataGDA.norAlpha(1,:));
if (length(a)>2)|(length(a)==0)
	fprintf('Axes selection error, must be one or two axes only\n')   
elseif length(a)==1
   if (a(1)>0)&(a(1)<=tmp)
      tmp=spreadGDA(T,L,dataGDA);
      plot(tmp(:,a(1)),symb);
   else
      fprintf('Axes selection error, invalid axis reference\n')
   end   
elseif ((a(1)>0)&(a(1)<=tmp))&((a(2)>0)&(a(2)<=tmp))
   tmp=spreadGDA(T,L,dataGDA);
   plot(tmp(:,a(1)),tmp(:,a(2)),symb);
else
         fprintf('Axes selection error, invalid axis reference\n')
end

⌨️ 快捷键说明

复制代码Ctrl + C
搜索代码Ctrl + F
全屏模式F11
增大字号Ctrl + =
减小字号Ctrl + -
显示快捷键?