Problem 44676. Mean = Standard Deviation

Solution 2810374

Submitted on 8 Aug 2020 by Alfonso Nieto-Castanon
  • Size: 31
  • This is the leading solution.
This solution is locked. To view this solution, you need to provide a solution of the same size or smaller.

Test Suite

Test Status Code Input and Output
1   Pass
for idx = 5:50 x = idx; Series = meanEqualsStd(x); mSeries = mean(Series); sSeries = std(Series,1); assert(length(Series)==x); assert(round(mSeries)==mSeries); assert(round(sSeries)==sSeries); assert(all(round(Series) == Series)); assert(all(round(Series) >= 1)); assert(mSeries == sSeries); end

2   Pass
filetext = fileread('meanEqualsStd.m'); assert(isempty(strfind(filetext, 'echo'))) assert(isempty(strfind(filetext, 'assert')))

Suggested Problems

More from this Author62

Community Treasure Hunt

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

Start Hunting!