Re: Trivial question....
- From: "Yang Zhang" <zhyang99@xxxxxxxxxxx>
- Date: Mon, 30 Apr 2007 15:14:25 -0400
Max wrote:
Hey guys,
I have a very simple problem, but for a MATLAB newbie it's quite
difficult to solve it.
Assume I have (1582 x 15) matrix.
I would like to apply something like
ans=log(data(1:1582,1))-log(data((1,1)), to all the columns of the
matrix.
Or in other words: I would like to "normalize" the matrix so that
the
starting point for all m's (there are 15) is 0. How do I do that?
Thanks
Max
Suppose your data matrix is X
meanX = mean(X);
normX = X - repmat(meanX,size(x,1),1);
normX has zero column mean.
Hope it helps.
Yang
.
- Follow-Ups:
- Re: Trivial question....
- From: Max
- Re: Trivial question....
- References:
- Trivial question....
- From: Max
- Trivial question....
- Prev by Date: Re: Converting MATLAB files into C or C++
- Next by Date: read files recursiveley
- Previous by thread: Trivial question....
- Next by thread: Re: Trivial question....
- Index(es):