From 27566d93e2c47b1f14771c36eeb75b40e340b3e0 Mon Sep 17 00:00:00 2001 From: Lukas Elmer Date: Mon, 28 Oct 2013 18:02:15 +0100 Subject: [PATCH] Added another matlab example --- samples/Matlab/normalize.m | 6 ++++++ 1 file changed, 6 insertions(+) create mode 100644 samples/Matlab/normalize.m diff --git a/samples/Matlab/normalize.m b/samples/Matlab/normalize.m new file mode 100644 index 00000000..f4f33493 --- /dev/null +++ b/samples/Matlab/normalize.m @@ -0,0 +1,6 @@ +function [ d, d_mean, d_std ] = normalize( d ) + d_mean = mean(d); + d = d - repmat(d_mean, size(d,1), 1); + d_std = std(d); + d = d./ repmat(d_std, size(d,1), 1); +end