-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathmvrecenter.m
32 lines (28 loc) · 915 Bytes
/
mvrecenter.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
function [Y] = mvrecenter(X,xmean)
%MVRECENTER -- re-centers data in a row-wise matrix
%
% Usage:
% [Y] = mvrecenter(X,xmean)
%
% Inputs:
% X the data matrix to re-center
% xmean a vector containing the column means
%
% Outputs:
% Y the re-centered data
%
% Description:
% This function re-centers a data matrix by using the 'xmean'
% input. See the function 'mvcenter'.
%
% 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: mvrecenter.m,v 1.2 2001/12/04 10:01:22 rune Exp $
% finding the size of X
[m,n] = size(X);
Y = X + ones(m,1)*xmean;
% end of mvrecenter