da_pcavr.m
来自「王小平《遗传算法——理论、应用与软件实现》随书光盘」· M 代码 · 共 53 行
M
53 行
%
% da_pcavr
%
% Plots the variance of the individual prinipal
% components
%
w1=gcf;
da_front;
da_pcapb;
set(w1,'NumberTitle','off','Name','Principal Component Analysis');
drawnow;
figure(w1);
ax1=axes(...
'Units','pixels',...
'Position',[80 120 500 270],...
'Box','on',...
'Color',[0 0 0],...
'Visible','on');
%
% Print a title
%
text1=da_text(w1,200,410,250,15,'Plot of principal component variances',[1 1 1],[1 0 0]);
%
% Plot the contribution to a model plot
%
%bar(ssq(:,4));
%
% Own PCA routine
%
bar(ssq);
[D L]=size(ssq);
set(ax1,'Xlim',[0 D],'Ylim',[0 100]);
Xlabel('Principal component number');
Ylabel('Percentage variation in original data explained');
%
% Save coefficients button
%
but10=uicontrol(w1,...
'style','push',...
'position',[20 40 175 20],...
'string','Save loadings',...
'callback',[
'dummy=pcincl(data,include_var,output_var);',...
'[dummy m s]=mcen(dummy);',...
'clear dummy;',...
'svpca('''',include_var,m,s,c);']);
⌨️ 快捷键说明
复制代码Ctrl + C
搜索代码Ctrl + F
全屏模式F11
增大字号Ctrl + =
减小字号Ctrl + -
显示快捷键?