Cody

# Problem 44498. Please check the last row

Solution 2067907

Submitted on 24 Dec 2019 by Asif Newaz
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
data=[... 1 3 6 7 9 3 5 6 9 1]; output_correct =[... 1 3 6 7 9 3 5 6 9 1 2 4 6 8 5]; assert(isequal(check_ave(data),output_correct))

a = 2 4 6 8 5 data = 1 3 6 7 9 3 5 6 9 1 2 4 6 8 5 op = 1 3 6 7 9 3 5 6 9 1 2 4 6 8 5

2   Pass
data=[... 1 3 6 7 9 3 5 6 9 1 2 4 6 8 5]; output_correct = data; assert(isequal(check_ave(data),output_correct))

a = 2 4 6 8 5 op = 1 3 6 7 9 3 5 6 9 1 2 4 6 8 5

3   Pass
data=[... 2 3 0 0 6 1 3 6 0 1 3 3 6 9 2 2 3 4 3 3]; output_correct = data; assert(isequal(check_ave(data),output_correct))

a = 2 3 4 3 3 op = 2 3 0 0 6 1 3 6 0 1 3 3 6 9 2 2 3 4 3 3

4   Pass
data=[... 2 3 0 0 6 1 3 6 0 1 3 3 6 9 2]; output_correct =[... 2 3 0 0 6 1 3 6 0 1 3 3 6 9 2 2 3 4 3 3]; assert(isequal(check_ave(data),output_correct))

a = 2 3 4 3 3 data = 2 3 0 0 6 1 3 6 0 1 3 3 6 9 2 2 3 4 3 3 op = 2 3 0 0 6 1 3 6 0 1 3 3 6 9 2 2 3 4 3 3

5   Pass
data = [1:1000;999:-1:0]; output_correct =[data;repmat(500,1,1000)]; assert(isequal(check_ave(data),output_correct))

a = Columns 1 through 30 500 500 500 500 500 500 500 500 500 500 500 500 500 500 500 500 500 500 500 500 500 500 500 500 500 500 500 500 500 500 Columns 31 through 60 500 500 500 500 500 500 500 500 500 500 500 500 500 500 500 500 500 500 500 500 500 500 500 500 500 500 500 500 500 500 Columns 61 through 90 500 500 500 500 500 500 500 500 500 500 500 500 500 500 500 500 500 500 500 500 500 500 500 500 500 500 500 500 500 500 Columns 91 through 120 500 500 500 500 500 500 500 500 500 500 500 500 500 500 500 500 500 500 500 500 500 500 500 500 500 500 500 500 500 500 Columns 121 through 150 500 500 500 500 500 500 500 500 500 500 500 500 500 500 500 500 500 500 500 500 500 500 500 500 500 500 500 500 500 500 Columns 151 through 180 500 500 500 500 500 500 500 500 500 500 500 500 500 500 500 500 500 500 500 500 500 500 500 500 500 500 500 500 500 500 Columns 181 through 210 500 500 500 500 500 500 500 500 500 500 500 500 500 500 500 500 500 500 500 500 500 500 500 500 500 500 500 500 500 500 Columns 211 through 240 500 500 500 500 500 500 500 500 500 500 500 500 500 500 500 500 500 500 500 500 500 500 500 500 500 500 500 500 500 500 Columns 241 through 270 500 500 500 500 500 500 500 500 500 500 500 500 500 500 500 500 500 500 500 500 500 500 500 500 500 500 500 500 500 500 Columns 271 through 300 500 500 500 500 500 500 500 500 500 500 500 500 500 500 500 500 500 500 500 500 500 500 500 500 500 500 500 500 500 500 Columns 301 through 330 500 500 500 500 500 500 500 500 500 500 500 500 500 500 500 500 500 500 500 500 500 500 500 500 500 500 500 500 500 500 Columns 331 through 360 500 500 500 500 500 500 500 500 500 500 500 500 500 500 500 500 500 500 500 500 500 500 500 500 500 500 500 500 500 500 Columns 361 through 390 500 500 500 500 500 500 500 500 500 500 500 500 500 500 500 500 500 500 500 500 500 500 500 500 500 500 500 500 500 500 Columns 391 through 420 500 500 500 500 500 500 500 500 500 500 500 500 500 500 500 500 500 500 500 500 500 500 500 500 500 500 500 500 500 500 Columns 421 through 450 500 500 500 500 500 500 500 500 500 500 500 500 500 500 500 500 500 500 500 500 500 500 500 500 500 500 500 500 500 500 Columns 451 through 480 500 500 500 500 500 500 500 500 500 500 500 500 500 500 500 500 500 500 500 500 500 500 500 500 500 500 500 500 500 500 Columns 481 through 510 500 500 500 500 500 500 500 500 500 500 500 500 500 500 500 500 500 500 500 500 500 500 500 500 500 500 500 500 500 500 Columns 511 through 540 500 500 500 500 500 500 500 500 500 500 500 500 500 500 500 500 500 500 500 500 500 500 500 500 500 500 500 500 500 500 Columns 541 through 570 500 500 500 500 500 500 500 500 500 500 500 500 500 500 500 500 500 500 500 500 500 500 500 500 500 500 500 500 500 500 Columns 571 through 600 500 500 500 500 500 500 500 500 500 500 500 500 500 500 500 500 500 500 500 500 500 500 500 500 500 500 500 500 500 500 Columns 601 through 630 500 500 500 500 500 500 500 500 500 500 500 500 500 500 500 500 500 500 500 500 500 500 500 500 500 500 500 500 500 500 Columns 631 through 660 500 500 500 500 500 500 500 500 500 500 500 500 500 500 500 500 500 500 500 500 500 500 500 500 500 500 500 500 500 500 Columns 661 through 690 500 500 500 500 500 500 500 500 500 500 500 500 500 500 500 500 500 500 500 500 500 500 500 500 500 500 500 500 500 500 Columns 691 through 720 500 500 500 500 500 500 500 500 500 500 500 500 500 500 500 500 500 500 500 500 500 500 500 500 500 500 500 500 500 500 Columns 721 through 750 500 500 500 500 500 500 500 500 500 500 500 500 500 500 500 500 500 500 500 500 500 500 500 500 500 500 500 500 500 500 Columns 751 through 780 500 500 500 500 500 500 500 500 500 500 500 500 500 500 500 500 500 500 500 500 500 500 500 500 500 500 500 500 500 500 Columns 781 through 810 500 500 500 500 500 500 500 500 500 500 500 500 500 500 500 500 500 500 500 500 500 500 500 500 500 500 500 500 500 500 Columns 811 through 840 500 500 500 500 500 500 500 500 500 500 500 500 500 500 500 500 500 500 500 500 500 500 500 500 500 500 500 500 500 500 Columns 841 through 870 500 500 500 500 500 500 500 500 500 500 500 500 500 500 500 500 500 500 500 500 500 500 500 500 500 500 500 500 500 500 Columns 871 through 900 500 500 500 500 500 500 500 500 500 500 500 500 500 500 500 500 500 500 500 500 500 500 500 500 500 500 500 500 500 500 Columns 901 through 930 500 500 500 500 500 500 500 500 500 500 500 500 500 500 500 500 500 500 500 500 500 500 500 500 500 500 500 500 500 500 Columns 931 through 960 500 500 500 500 500 500 500 500 500 500 500 500 500 500 500 500 500 500 500 500 500 500 500 500 500 500 500 500 500 500 Columns 961 through 990 500 500 500 500 500 500 500 500 500 500 500 500 500 500 500 500 500 500 500 500 500 500 500 500 500 500 500 500 500 500 Columns 991 through 1000 500 500 500 500 500 500 500 500 500 500 data = Columns 1 through 15 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 999 998 997 996 995 994 993 992 991 990 989 988 987 986 985 500 500 500 500 500 500 500 500 500 500 500 500 500 500 500 Columns 16 through 30 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 984 983 982 981 980 979 978 977 976 975 974 973 972 971 970 500 500 500 500 500 500 500 500 500 500 500 500 500 500 500 Columns 31 through 45 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 969 968 967 966 965 964 963 962 961 960 959 958 957 956 955 500 500 500 500 500 500 500 500 500 500 500 500 500 500 500 Columns 46 through 60 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 954 953 952 951 950 949 948 947 946 945 944 943 942 941 940 500 500 500 500 500 500 500 500 500 500 500 500 500 500 500 Columns 61 through 75 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 939 938 937 936 935 934 933 932 931 930 929 928 927 926 925 500 500 500 500 500 500 500 500 500 500 500 500 500 500 500 Columns 76 through 90 76 77 78 79 80 81 82 83 84 85 86 ...