Mean = Standard Deviation - MATLAB Cody - MATLAB Central

Problem 44676. Mean = Standard Deviation

Difficulty:Rate

Create a series with following properties;

  1. All of the members should be positive integer
  2. Mean of the series should be integer
  3. Standard deviation of the series should be integer (use a normalization factor of N instead of N-1)
  4. Mean should be equal to standard deviation

For example if input is 6, you can return the following series;

out = [12 44 2 24 2 6]
mean(out) = 15;
std(out,1) = 15;

Another example; if input is 4, a possible solution;

out = [24 2 2 48];
mean(out) = 19;
std(out,1) = 19;

Solution Stats

16.48% Correct | 83.52% Incorrect
Last Solution submitted on Dec 11, 2024

Problem Comments

Solution Comments

Show comments
Why should you share code?
In a discussion on LInkedin about my recent blog post, Do these...
1
3

Problem Recent Solvers7

Suggested Problems

More from this Author92

Community Treasure Hunt

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

Start Hunting!