Cody

Problem 44676. Mean = Standard Deviation

Solution 2885357

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 ans = logical 1 meany = 2 stdy = 2 ans = logical 1 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 ans = logical 1 ans = logical 1 meany = 6 stdy = 6 ans = logical 1 ans = logical 1 ans = logical 1 ans = logical 1 ans = logical 1 ans = logical 1 meany = 6 stdy = 6 ans = logical 1 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 ans = logical 1 ans = logical 1 meany = 11 stdy = 11 ans = logical 1 ans = logical 1 ans = logical 1 ans = logical 1 ans = logical 1 ans = logical 1 meany = 12 stdy = 12 ans = logical 1 ans = logical 1 ans = logical 1 ans = logical 1 ans = logical 1 ans = logical 1 meany = 7 stdy = 7 ans = logical 1 ans = logical 1 ans = logical 1 ans = logical 1 ans = logical 1 ans = logical 1 meany = 8 stdy = 8 ans = logical 1 ans = logical 1 ans = logical 1 ans = logical 1 ans = logical 1 ans = logical 1 meany = 8 stdy = 8 ans = logical 1 ans = logical 1 ans = logical 1 ans = logical 1 ans = logical 1 ans = logical 1 meany = 22 stdy = 22 ans = logical 1 ans = logical 1 ans = logical 1 ans = logical 1 ans = logical 1 ans = logical 1 meany = 20 stdy = 20 ans = logical 1 ans = logical 1 ans = logical 1 ans = logical 1 ans = logical 1 ans = logical 1 meany = 14 stdy = 14 ans = logical 1 ans = logical 1 ans = logical 1 ans = logical 1 ans = logical 1 ans = logical 1 meany = 20 stdy = 20 ans = logical 1 ans = logical 1 ans = logical 1 ans = logical 1 ans = logical 1 ans = logical 1 meany = 20 stdy = 20 ans = logical 1 ans = logical 1 ans = logical 1 ans = logical 1 ans = logical 1 ans = logical 1 meany = 21 stdy = 21 ans = logical 1 ans = logical 1 ans = logical 1 ans = logical 1 ans = logical 1 ans = logical 1 meany = 26 stdy = 26 ans = logical 1 ans = logical 1 ans = logical 1 ans = logical 1 ans = logical 1 ans = logical 1 meany = 19 stdy = 19 ans = logical 1 ans = logical 1 ans = logical 1 ans = logical 1 ans = logical 1 ans = logical 1 meany = 24 stdy = 24 ans = logical 1 ans = logical 1 ans = logical 1 ans = logical 1 ans = logical 1 ans = logical 1 meany = 23 stdy = 23 ans = logical 1 ans = logical 1 ans = logical 1 ans = logical 1 ans = logical 1 ans = logical 1 meany = 20 stdy = 20 ans = logical 1 ans = logical 1 ans = logical 1 ans = logical 1 ans = logical 1 ans = logical 1 meany = 18 stdy = 18 ans = logical 1 ans = logical 1 ans = logical 1 ans = logical 1 ans = logical 1 ans = logical 1 meany = 24 stdy = 24 ans = logical 1 ans = logical 1 ans = logical 1 ans = logical 1 ans = logical 1 ans = logical 1 meany = 34 stdy = 34 ans = logical 1 ans = logical 1 ans = logical 1 ans = logical 1 ans = logical 1 ans = logical 1 meany = 26 stdy = 26 ans = logical 1 ans = logical 1 ans = logical 1 ans = logical 1 ans = logical 1 ans = logical 1 meany = 20 stdy = 20 ans = logical 1 ans = logical 1 ans = logical 1 ans = logical 1 ans = logical 1 ans = logical 1 meany = 26 stdy = 26 ans = logical 1 ans = logical 1 ans = logical 1 ans = logical 1 ans = logical 1 ans = logical 1 meany = 32 stdy = 32 ans = logical 1 ans = logical 1 ans = logical 1 ans = logical 1 ans = logical 1 ans = logical 1 meany = 30 stdy = 30 ans = logical 1 ans = logical 1 ans = logical 1 ans = logical 1 ans = logical 1 ans = logical 1 meany = 39 stdy = 39 ans = logical 1 ans = logical 1 ans = logical 1 ans = logical 1 ans = logical 1 ans = logical 1 meany = 54 stdy = 54 ans = logical 1 ans = logical 1 ans = logical 1 ans = logical 1 ans = logical 1 ans = logical 1 meany = 44 stdy = 44 ans = logical 1 ans = logical 1 ans = logical 1 ans = logical 1 ans = logical 1 ans = logical 1 meany = 48 stdy = 48 ans = logical 1 ans = logical 1 ans = logical 1 ans = logical 1 ans = logical 1 ans = logical 1 meany = 40 stdy = 40 ans = logical 1 ans = logical 1 ans = logical 1 ans = logical 1 ans = logical 1 ans = logical 1 meany = 44 stdy = 44 ans = logical 1 ans = logical 1 ans = logical 1 ans = logical 1 ans = logical 1 ans = logical 1 meany = 33 stdy = 33 ans = logical 1 ans = logical 1 ans = logical 1 ans = logical 1 ans = logical 1 ans = logical 1 meany = 48 stdy = 48 ans = logical 1 ans = logical 1 ans = logical 1 ans = logical 1 ans = logical 1 ans = logical 1 meany = 32 stdy = 32 ans = logical 1 ans = logical 1 ans = logical 1 ans = logical 1 ans = logical 1 ans = logical 1 meany = 42 stdy = 42 ans = logical 1 ans = logical 1 ans = logical 1 ans = logical 1 ans = logical 1 ans = logical 1 meany = 43 stdy = 43 ans = logical 1 ans = logical 1 ans = logical 1 ans = logical 1 ans = logical 1 ans = logical 1 meany = 42 stdy = 42 ans = logical 1 ans = logical 1 ans = logical 1 ans = logical 1 ans = logical 0 ans = logical 1 meany = 37 stdy = 37

Assertion failed.

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

Suggested Problems

More from this Author68

Community Treasure Hunt

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

Start Hunting!