⭐ 欢迎来到虫虫下载站! | 📦 资源下载 📁 资源专辑 ℹ️ 关于我们
⭐ 虫虫下载站

📄 explcore.m

📁 多维数据处理:MATLAB源程序用于处理多维数据
💻 M
字号:
function [Comb,ExplVariat]=explcore(G,Fac,n);% function [Comb,ExplVariat]=explcore(G,Fac,n);% 'explcore.m'
% $ Version 1.03 $ Date 28. Oct 1999 $ Not compiled $ 'improved help'% $ Version 1.02 $ Date 17. Sep 1998 $ Not compiled $%% This algorithm requires access to:% 'two2n.m' %% ---------------------------------------------------------%           For interpretation of cores and arrays% ---------------------------------------------------------%% Copyright% Claus A. Andersson 1995-% Chemometrics Group, Food Technology% Department of Food and Dairy Science% Royal Veterinary and Agricultutal University% Rolighedsvej 30, T254% DK-1958 Frederiksberg% Denmark% E-mail	claus@andersson.dk%% [Comb,ExplVariat,ExplVarian]=explcore(G,Fac,n);%% G         : Core array from Tukcer3 model% Fac       : Vector defining the dimensions of the core array G%             Ex. [2 3 3]% n         : Show only the 'n' largest factor combinations.%if ~exist('n'),    n=10;end;if n>length(G(:));    n=length(G(:));end;C=length(Fac(1,:));Par=zeros(1,C);ssgunc=sum(G(:).^2);fprintf('Col1: Number in list\n');fprintf('Col2: Index to elements\n');fprintf('Col3: Explained variation (sum of squares) of the core.\n'); fprintf('Col4: Core entry.\n'); fprintf('Col5: Sq. core entry.\n'); for l=1:n,    [i j]=max(G(:).^2);        [a b]=find(G==G(j));    a=a(1);    b=b(1);    Par=two2n(Fac,[a b]);        fprintf('%2i    ',l);    fprintf('(');    for c=1:C-1,        fprintf('%2i,',Par(c));    end;    Comb(l,:)=Par;    ExplVariat(l)=100*G(a,b).^2/ssgunc;    fprintf('%2i) %15.5f%% %15.5f  %15.5f\n',Par(C),ExplVariat(l),G(a,b),G(a,b).^2);    G(a,b)=0;end; 

⌨️ 快捷键说明

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