zero mean and one variance

 Accepted Answer

Roger Stafford
Roger Stafford on 21 Nov 2013
That's easy. Subtract the dataset's mean value from each element. Then divide each element by the dataset's standard deviation. My question to you is, why would you want to do such a thing?

1 Comment

subha
subha on 21 Nov 2013
Edited: subha on 22 Nov 2013
i want to give zero mean and unit variance Gaussian input to my restricted boltzmann machine

Sign in to comment.

More Answers (1)

Normally distributed:
out = randn(1000,1);

2 Comments

This will generate some random numbers with zero mean and 1 variance.But,i want to get input from a dataset which has zero mean and 1 variance.So for that i want to make my dataset to that condition
subha
subha on 22 Nov 2013
Edited: subha on 22 Nov 2013
randn() will generate any random values with standard normal distributed value.am i right? how to generate random values fr0m the dataset using randn command

Sign in to comment.

Categories

Asked:

on 21 Nov 2013

Edited:

on 22 Nov 2013

Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!