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

📄 stdize.m

📁 PLS_Toolbox是用于故障检测与诊断方面的matlab工具箱
💻 M
字号:
function stdspec = stdize(nspec,stdmat,stdvect);
%STDIZE Standardizes new spectra using previously developed transform
%  Inputs are the new spectra to be standardized (nspec),
%  the standardization matrix (stdmat) and the additive background
%  correction (stdvect). The output is the standardized spectra (stdspec).
%  The standardization matrix and background correction can be obtained
%  using the functions STDGEN, STDGENDW and STDGENNS.
%
%I/O: stdspec = stdize(nspec,stdmat,stdvect);
%
%See also: STDSSLCT, STDGEN, STDDEMO, STDGENDW, STDGENNS

%Copyright Eigenvector Research, Inc. 1997-98
%bmw 5/30/97, nbg 2/23/98,12/98

if nargin<3
  [ms,ns] = size(nspec);
  [mm,nm] = size(stdmat);
  if ns~=mm
    error('Spectrum and transfer matrix sizes not compatible')
  end
  stdspec = nspec*stdmat;
else
  [ms,ns] = size(nspec);
  [mm,nm] = size(stdmat);
  [mv,nv] = size(stdvect);
  if (ns~=mm | nm~=nv)
    error('Spectrum, transfer matrix and background vector sizes not compatible')
  end
  stdspec = nspec*stdmat + ones(ms,1)*stdvect;
end

⌨️ 快捷键说明

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