image thumbnail

StdMArray

version 1.0.1 (1.14 KB) by Adrian Once
Creates an array with the given standard deviation and mean.

7 Downloads

Updated 30 Sep 2019

View License

The function accepts the standard deviation, mean, and the number of values in the vector.
The function can be used in statistical testing (e.g. T-test) if only the standard deviation and mean are given.

Sample:

>> x=StdMArray(5,10,28)
x =
Columns 1 through 13
5.0000 5.0000 5.0000 5.0000 5.0000 5.0000 5.0000 5.0000 5.0000 5.0000 5.0000 5.0000 5.0000
Columns 14 through 26
5.0000 5.0000 5.0000 5.0000 5.0000 5.0000 5.0000 5.0000 5.0000 5.0000 5.0000 5.0000 5.0000
Columns 27 through 28
-31.7423 41.7423
>> mean(x)
ans =
5
>> std(x)
ans =
10

Cite As

Adrian Once (2021). StdMArray (https://www.mathworks.com/matlabcentral/fileexchange/72434-stdmarray), MATLAB Central File Exchange. Retrieved .

MATLAB Release Compatibility
Created with R2019a
Compatible with any release
Platform Compatibility
Windows macOS Linux
Tags Add Tags

Community Treasure Hunt

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

Start Hunting!