rescale.m
来自「PLS_Toolbox是用于故障检测与诊断方面的matlab工具箱」· M 代码 · 共 25 行
M
25 行
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: rx = rescale(x,mx,stdx);
%
% If only two input arguments are supplied the
% function rescales the means only.
%
%I/O: rx = rescale(x,mx);
%
%See also: AUTO, MDAUTO, MDMNCN, MDRESCAL, MDSCALE, MNCN, SCALE
%Copyright Eigenvector Research, Inc. 1991-98
%Modified 11/93
%Checked on MATLAB 5 by BMW 1/4/97
[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 + =
减小字号Ctrl + -
显示快捷键?