A standard normal distribution already has mean 0 and variance 1.
If you want to change the mean, just "translate" the distribution, i.e., add your mean value to each generated number. Similarly, if you want to change the variance, just "scale" the distribution, i.e., multiply all your numbers by sqrt(v)
. For example,
v = 1.5; % variance
sigma = sqrt(v); % standard deviation
mu = 2; % mean
n = 1000
X = sigma .* randn(n, 1) + mu;
stats = [mean(X) std(X) var(X)]
See the following article:
https://ch.mathworks.com/help/matlab/math/random-numbers-with-specific-mean-and-variance.html
for more info.