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

📄 rescale.m

📁 偏最小二乘算法在MATLAB中的实现
💻 M
字号:
function rx = rescale(x,mx,stdx)
%RESCALE Rescales matrix 
%  Rescales a matrix (x) using the means (mx) and standard 
%  deviation (stdx) vectors specified.  I/O format is:
%  rx = rescale(x,mx,stdx);
%  If only two input arguments are supplied the function rescales
%  the means only.  The I/O format is then:
%  rx = rescale(x,mx);

%  Copyright
%  Barry M. Wise
%  1991
%  Modified November 1993

[m,n] = size(x);
if nargin == 3
  rx = (x.*stdx(ones(m,1),:))+mx(ones(m,1),:);
else
  rx = x+mx(ones(m,1),:);
end

⌨️ 快捷键说明

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