-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathmvrevarscale.m
35 lines (30 loc) · 1.02 KB
/
mvrevarscale.m
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
function [outdata] = mvrevarscale(X,xsdev)
%MVREVARSCALE -- rescales the data in a variance scaled matrix
%
% Usage:
% [outdata] = mvrevarscale(X,xsdev)
%
% Inputs:
% X the data matrix to be rescaled
% xsdev vector with standard deviations for each column
%
% Outputs:
% outdata is the rescaled data
%
% Description:
% Rescale a variance scaled matrix, see 'mvvarscale'.
%
% Copying:
% MVARTOOLS, Copyright (C) 1999-2001 Rune Mathisen <[email protected]>
% MVARTOOLS comes with ABSOLUTELY NO WARRANTY; for details type
% `mvwarranty'. This is free software, and you are welcome to
% redistribute it under certain conditions; type `mvcopying' for
% details. For more information on MVARTOOLS, type 'mvreadme'.
% $Id: mvrevarscale.m,v 1.2 2001/12/04 10:06:01 rune Exp $
if (nargin ~= 2), % wrong number of input arguments
error('Wrong number of input arguments! Usage: mvrevarscale(X,xsdev)');
break;
end
[m,n] = size(X);
outdata = X .* (ones(m,1) * xsdev);
% end of mvrevarscale