Cody

# Problem 44676. Mean = Standard Deviation

Solution 2885384

Submitted on 28 Aug 2020
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   Fail
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

ans = logical 1 ans = logical 1 ans = logical 1 ans = logical 1 ans = logical 1 meany = 4 stdy = 4 ans = logical 1 ans = logical 1 ans = logical 1 ans = logical 1 x = 6 y = 1 1 1 0 0 3 ans = logical 1 meany = 1 stdy = 1

Assertion failed.

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

### Community Treasure Hunt

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

Start Hunting!