Cody

Solution 1417100

Submitted on 15 Jan 2018 by David Verrelli
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))

data = 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))

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))

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))

data = 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))

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 87 88 89 90 924 923 922 921 920 919 918 917 916 915 914 913 912 911 910 500 500 500 500 500 500 500 500 500 500 500 500 500 500 500 Columns 91 through 105 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 909 908 907 906 905 904 903 902 901 900 899 898 897 896 895 500 500 500 500 500 500 500 500 500 500 500 500 500 500 500 Columns 106 through 120 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 894 893 892 891 890 889 888 887 886 885 884 883 882 881 880 500 500 500 500 500 500 500 500 500 500 500 500 500 500 500 Columns 121 through 135 121 122 123 124 125 126 127 128 129 130 131 132 133 134 135 879 878 877 876 875 874 873 872 871 870 869 868 867 866 865 500 500 500 500 500 500 500 500 500 500 500 500 500 500 500 Columns 136 through 150 136 137 138 139 140 141 142 143 144 145 146 147 148 149 150 864 863 862 861 860 859 858 857 856 855 854 853 852 851 850 500 500 500 500 500 500 500 500 500 500 500 500 500 500 500 Columns 151 through 165 151 152 153 154 155 156 157 158 159 160 161 162 163 164 165 849 848 847 846 845 844 843 842 841 840 839 838 837 836 835 500 500 500 500 500 500 500 500 500 500 500 500 500 500 500 Columns 166 through 180 166 167 168 169 170 171 172 173 174 175 176 177 178 179 180 834 833 832 831 830 829 828 827 826 825 824 823 822 821 820 500 500 500 500 500 500 500 500 500 500 500 500 500 500 500 Columns 181 through 195 181 182 183 184 185 186 187 188 189 190 191 192 193 194 195 819 818 817 816 815 814 813 812 811 810 809 808 807 806 805 500 500 500 500 500 500 500 500 500 500 500 500 500 500 500 Columns 196 through 210 196 197 198 199 200 201 202 203 204 205 206 207 208 209 210 804 803 802 801 800 799 798 797 796 795 794 793 792 791 790 500 500 500 500 500 500 500 500 500 500 500 500 500 500 500 Columns 211 through 225 211 212 213 214 215 216 217 218 219 220 221 222 223 224 225 789 788 787 786 785 784 783 782 781 780 779 778 777 776 775 500 500 500 500 500 500 500 500 500 500 500 500 500 500 500 Columns 226 through 240 226 227 228 229 230 231 232 233 234 235 236 237 238 239 240 774 773 772 771 770 769 768 767 766 765 764 763 762 761 760 500 500 500 500 500 500 500 500 500 500 500 500 500 500 500 Columns 241 through 255 241 242 243 244 245 246 247 248 249 250 251 252 253 254 255 759 758 757 756 755 754 753 752 751 750 749 748 747 746 745 500 500 500 500 500 500 500 500 500 500 500 500 500 500 500 Columns 256 through 270 256 257 258 259 260 261 262 263 264 265 266 267 268 269 270 744 743 742 741 740 739 738 ...