Re: Trivial question....



Max wrote:


Yang,

Thanks for the fast reply. Probably I did not make my point clear
or
you understood it wrong or I misinterpreted your answer.

Lets try it again without log.
data is 1582x15 matrix. What I intend to do is:

From data(1:1582,1) subtract data(1,1)
From data(1:1582,2) subtract data(1,2)
From data(1:1582,3) subtract data(1,3) and so on..

Basically from each column subtract the starting value.

How do I do that?

Thanks again.

Max,
Sorry about my misleading solution...
if that is the case, try this:
x_tobesubtract = repmat(x(1,:),size(x,1),1);
xNorm = x - x_tobesubtract;

Hope it helps,
Yang
.