## zero mean and one variance

### subha (view profile)

on 21 Nov 2013
Latest activity Edited by subha

### subha (view profile)

on 22 Nov 2013
Accepted Answer by Roger Stafford

### Roger Stafford (view profile)

How to make dataset into zero mean and 1 variance

## Products

No products are associated with this question.

### Roger Stafford (view profile)

Answer by Roger Stafford

### Roger Stafford (view profile)

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?

subha

### subha (view profile)

on 21 Nov 2013

i want to give zero mean and unit variance Gaussian input to my restricted boltzmann machine

### Andrei Bobrov (view profile)

Answer by Andrei Bobrov

### Andrei Bobrov (view profile)

on 21 Nov 2013

Normally distributed:

```out = randn(1000,1);
```

subha

### subha (view profile)

on 21 Nov 2013

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 (view profile)

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

#### Join the 15-year community celebration.

Play games and win prizes!

MATLAB and Simulink resources for Arduino, LEGO, and Raspberry Pi