Clear Filters
Clear Filters

the content of random()-function

1 view (last 30 days)
I would like to understand the random()-function. I am not really understanding the explanation regarding this function given in 'Help' section of Matlab.
So, if I have:
random('norm',4,7,5,1)
where 5, 1 within the function is the 5X1 matrix. What are 4 and 7? Result of this function is not making much sense to me. Help appreciated.

Accepted Answer

Walter Roberson
Walter Roberson on 3 Jun 2018
4 would be the mean and 7 would be the standard deviation
>> t = random('norm',4,7,100000,1);
>> mean(t)
ans =
3.99442010154698
>> std(t)
ans =
6.97807359086561

More Answers (0)

Tags

Community Treasure Hunt

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

Start Hunting!