MATLAB: Generating random variable from certain standard deviation and mean random variable Could you please help me how can I generate random variable from Gaussian distribution with zero mean and 0.3 standard deviation? Best Answer a = .3;% standard deviationb = 0; % meanout = a.*randn + b; Related SolutionsMATLAB: Standard Deviation numdev = floor((mean(S)-min(S))./std(S));Determining the position of each standard deviation and plotting is left as a homework exercise.Though possibly you wantnumdev = floor((mean(S,2)-min(S,[],2))./std(S,[],2)); MATLAB: Random Gaussian variable distribution If you want normally-distributed random numbers with zero mean and unit variance (and therefore unit standard deviation), use the randn function:N01 = randn(1,10);This will generate a 10-element row vector with zero mean and unit variance. Related QuestionStandard deviation of values with standard deviationCalculate 2 standard deviations
Best Answer