user2180513
user2180513

Reputation: 75

How do I median-center my data?

I have a 1x600 vector that I have log2 transformed and now I wish to median center. Does anyone know the code for this in Matlab?

Upvotes: 0

Views: 4054

Answers (1)

klurie
klurie

Reputation: 1060

Just subtract the median value from the data value. Here is an example if you want to perform median centering on the log transformed data.

medianValue = median(logData);
medianCtrData = logData-medianValue;

Upvotes: 2

Related Questions