Cody

Problem 44676. Mean = Standard Deviation

Solution 2885378

Submitted on 28 Aug 2020 by Dennis Gimlin
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

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 meany = 8 stdy = 8 ans = logical 1 ans = logical 1 ans = logical 1 ans = logical 1 ans = logical 1 meany = 10 stdy = 10 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 meany = 4 stdy = 4 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 meany = 10 stdy = 10 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 meany = 16 stdy = 16 ans = logical 1 ans = logical 1 ans = logical 1 ans = logical 1 ans = logical 1 meany = 9 stdy = 9 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 meany = 16 stdy = 16 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 meany = 11 stdy = 11 ans = logical 1 ans = logical 1 ans = logical 1 ans = logical 1 ans = logical 1 meany = 16 stdy = 16 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 meany = 22 stdy = 22 ans = logical 1 ans = logical 1 ans = logical 1 ans = logical 1 ans = logical 1 meany = 10 stdy = 10 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 meany = 21 stdy = 21 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 meany = 22 stdy = 22 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 meany = 34 stdy = 34 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 meany = 20 stdy = 20 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 meany = 32 stdy = 32 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 meany = 28 stdy = 28 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 meany = 31 stdy = 31 ans = logical 1 ans = logical 1 ans = logical 1 ans = logical 1 ans = logical 1 meany = 38 stdy = 38 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 meany = 36 stdy = 36 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 meany = 40 stdy = 40 ans = logical 1 ans = logical 1 ans = logical 1 ans = logical 1 ans = logical 1 meany = 52 stdy = 52 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 meany = 32 stdy = 32 ans = logical 1 ans = logical 1 ans = logical 1 ans = logical 1 ans = logical 1 meany = 38 stdy = 38 ans = logical 1 ans = logical 1 ans = logical 1 ans = logical 1 ans = logical 1 meany = 41 stdy = 41 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 meany = 43 stdy = 43 ans = logical 1 ans = logical 1 ans = logical 1 ans = logical 1 ans = logical 1 meany = 46 stdy = 46 ans = logical 1 ans = logical 1 ans = logical 1 ans = logical 1 ans = logical 1 meany = 49 stdy = 49

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

Suggested Problems

More from this Author64

Community Treasure Hunt

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

Start Hunting!