Discover MakerZone

MATLAB and Simulink resources for Arduino, LEGO, and Raspberry Pi

Learn more

Discover what MATLAB® can do for your career.

Opportunities for recent engineering grads.

Apply Today

Correct

14Size
Leading solution size is 8.
This solution is locked. To view this solution, you need to provide a solution of the same size or smaller.

Test Suite

Test
Code Input and Output
1
Pass
 
%%
y_correct = 1;
assert(isequal(your_fcn_name,y_correct))
y =
     1
2
Pass
 
%%
y_correct = 1:100;
assert(isequal(your_fcn_name,y_correct))
y =
  Columns 1 through 10
     1     2     3     4     5     6     7     8     9    10
  Columns 11 through 20
    11    12    13    14    15    16    17    18    19    20
  Columns 21 through 30
    21    22    23    24    25    26    27    28    29    30
  Columns 31 through 40
    31    32    33    34    35    36    37    38    39    40
  Columns 41 through 50
    41    42    43    44    45    46    47    48    49    50
  Columns 51 through 60
    51    52    53    54    55    56    57    58    59    60
  Columns 61 through 70
    61    62    63    64    65    66    67    68    69    70
  Columns 71 through 80
    71    72    73    74    75    76    77    78    79    80
  Columns 81 through 90
    81    82    83    84    85    86    87    88    89    90
  Columns 91 through 100
    91    92    93    94    95    96    97    98    99   100
3
Pass
 
%%
y_correct = rand(100);
assert(isequal(your_fcn_name,y_correct))
y =
  Columns 1 through 6
    0.8147    0.1622    0.6443    0.0596    0.4229    0.5822
    0.9058    0.7943    0.3786    0.6820    0.0942    0.5407
    0.1270    0.3112    0.8116    0.0424    0.5985    0.8699
    0.9134    0.5285    0.5328    0.0714    0.4709    0.2648
    0.6324    0.1656    0.3507    0.5216    0.6959    0.3181
    0.0975    0.6020    0.9390    0.0967    0.6999    0.1192
    0.2785    0.2630    0.8759    0.8181    0.6385    0.9398
    0.5469    0.6541    0.5502    0.8175    0.0336    0.6456
    0.9575    0.6892    0.6225    0.7224    0.0688    0.4795
    0.9649    0.7482    0.5870    0.1499    0.3196    0.6393
    0.1576    0.4505    0.2077    0.6596    0.5309    0.5447
    0.9706    0.0838    0.3012    0.5186    0.6544    0.6473
    0.9572    0.2290    0.4709    0.9730    0.4076    0.5439
    0.4854    0.9133    0.2305    0.6490    0.8200    0.7210
    0.8003    0.1524    0.8443    0.8003    0.7184    0.5225
    0.1419    0.8258    0.1948    0.4538    0.9686    0.9937
    0.4218    0.5383    0.2259    0.4324    0.5313    0.2187
    0.9157    0.9961    0.1707    0.8253    0.3251    0.1058
    0.7922    0.0782    0.2277    0.0835    0.1056    0.1097
    0.9595    0.4427    0.4357    0.1332    0.6110    0.0636
    0.6557    0.1067    0.3111    0.1734    0.7788    0.4046
    0.0357    0.9619    0.9234    0.3909    0.4235    0.4484
    0.8491    0.0046    0.4302    0.8314    0.0908    0.3658
    0.9340    0.7749    0.1848    0.8034    0.2665    0.7635
    0.6787    0.8173    0.9049    0.0605    0.1537    0.6279
    0.7577    0.8687    0.9797    0.3993    0.2810    0.7720
    0.7431    0.0844    0.4389    0.5269    0.4401    0.9329
    0.3922    0.3998    0.1111    0.4168    0.5271    0.9727
    0.6555    0.2599    0.2581    0.6569    0.4574    0.1920
    0.1712    0.8001    0.4087    0.6280    0.8754    0.1389
    0.7060    0.4314    0.5949    0.2920    0.5181    0.6963
    0.0318    0.9106    0.2622    0.4317    0.9436    0.0938
    0.2769    0.1818    0.6028    0.0155    0.6377    0.5254
    0.0462    0.2638    0.7112    0.9841    0.9577    0.5303
    0.0971    0.1455    0.2217    0.1672    0.2407    0.8611
    0.8235    0.1361    0.1174    0.1062    0.6761    0.4849
    0.6948    0.8693    0.2967    0.3724    0.2891    0.3935
    0.3171    0.5797    0.3188    0.1981    0.6718    0.6714
    0.9502    0.5499    0.4242    0.4897    0.6951    0.7413
    0.0344    0.1450    0.5079    0.3395    0.0680    0.5201
    0.4387    0.8530    0.0855    0.9516    0.2548    0.3477
    0.3816    0.6221    0.2625    0.9203    0.2240    0.1500
    0.7655    0.3510    0.8010    0.0527    0.6678    0.5861
    0.7952    0.5132    0.0292    0.7379    0.8444    0.2621
    0.1869    0.4018    0.9289    0.2691    0.3445    0.0445
    0.4898    0.0760    0.7303    0.4228    0.7805    0.7549
    0.4456    0.2399    0.4886    0.5479    0.6753    0.2428
    0.6463    0.1233    0.5785    0.9427    0.0067    0.4424
    0.7094    0.1839    0.2373    0.4177    0.6022    0.6878
    0.7547    0.2400    0.4588    0.9831    0.3868    0.3592
    0.2760    0.4173    0.9631    0.3015    0.9160    0.7363
    0.6797    0.0497    0.5468    0.7011    0.0012    0.3947
    0.6551    0.9027    0.5211    0.6663    0.4624    0.6834
    0.1626    0.9448    0.2316    0.5391    0.4243    0.7040
    0.1190    0.4909    0.4889    0.6981    0.4609    0.4423
    0.4984    0.4893    0.6241    0.6665    0.7702    0.0196
    0.9597    0.3377    0.6791    0.1781    0.3225    0.3309
    0.3404    0.9001    0.3955    0.1280    0.7847    0.4243
    0.5853    0.3692    0.3674    0.9991    0.4714    0.2703
    0.2238    0.1112    0.9880    0.1711    0.0358    0.1971
    0.7513    0.7803    0.0377    0.0326    0.1759    0.8217
    0.2551    0.3897    0.8852    0.5612    0.7218    0.4299
    0.5060    0.2417    0.9133    0.8819    0.4735    0.8878
    0.6991    0.4039    0.7962    0.6692    0.1527    0.3912
    0.8909    0.0965    0.0987    0.1904    0.3411    0.7691
    0.9593    0.1320    0.2619    0.3689    0.6074    0.3968
    0.5472    0.9421    0.3354    0.4607    0.1917    0.8085
    0.1386    0.9561    0.6797    0.9816    0.7384    0.7551
    0.1493    0.5752    0.1366    0.1564    0.2428    0.3774
    0.2575    0.0598    0.7212    0.8555    0.9174    0.2160
    0.8407    0.2348    0.1068    0.6448    0.2691    0.7904
    0.2543    0.3532    0.6538    0.3763    0.7655    0.9493
    0.8143    0.8212    0.4942    0.1909    0.1887    0.3276
    0.2435    0.0154    0.7791    0.4283    0.2875    0.6713
    0.9293    0.0430    0.7150    0.4820    0.0911    0.4386
    0.3500    0.1690    0.9037    0.1206    0.5762    0.8335
    0.1966    0.6491    0.8909    0.5895    0.6834    0.7689
    0.2511    0.7317    0.3342    0.2262    0.5466    0.1673
    0.6160    0.6477    0.6987    0.3846    0.4257    0.8620
    0.4733    0.4509    0.1978    0.5830    0.6444    0.9899
    0.3517    0.5470    0.0305    0.2518    0.6476    0.5144
    0.8308    0.2963    0.7441    0.2904    0.6790    0.8843
    0.5853    0.7447    0.5000    0.6171    0.6358    0.5880
    0.5497    0.1890    0.4799    0.2653    0.9452    0.1548
    0.9172    0.6868    0.9047    0.8244    0.2089    0.1999
    0.2858    0.1835    0.6099    0.9827    0.7093    0.4070
    0.7572    0.3685    0.6177    0.7302    0.2362    0.7487
    0.7537    0.6256    0.8594    0.3439    0.1194    0.8256
    0.3804    0.7802    0.8055    0.5841    0.6073    0.7900
    0.5678    0.0811    0.5767    0.1078    0.4501    0.3185
    0.0759    0.9294    0.1829    0.9063    0.4587    0.5341
    0.0540    0.7757    0.2399    0.8797    0.6619    0.0900
    0.5308    0.4868    0.8865    0.8178    0.7703    0.1117
    0.7792    0.4359    0.0287    0.2607    0.3502    0.1363
    0.9340    0.4468    0.4899    0.5944    0.6620    0.6787
    0.1299    0.3063    0.1679    0.0225    0.4162    0.4952
    0.5688    0.5085    0.9787    0.4253    0.8419    0.1897
    0.4694    0.5108    0.7127    0.3127    0.8329    0.4950
    0.0119    0.8176    0.5005    0.1615    0.2564    0.1476
    0.3371    0.7948    0.4711    0.1788    0.6135    0.0550
  Columns 7 through 12
    0.8507    0.5590    0.6837    0.9879    0.6312    0.7829
    0.5606    0.8541    0.1321    0.1704    0.3551    0.6938
    0.9296    0.3479    0.7227    0.2578    0.9970    0.0098
    0.6967    0.4460    0.1104    0.3968    0.2242    0.8432
    0.5828    0.0542    0.1175    0.0740    0.6525    0.9223
    0.8154    0.1771    0.6407    0.6841    0.6050    0.7710
    0.8790    0.6628    0.3288    0.4024    0.3872    0.0427
    0.9889    0.3308    0.6538    0.9828    0.1422    0.3782
    0.0005    0.8985    0.7491    0.4022    0.0251    0.7043
    0.8654    0.1182    0.5832    0.6207    0.4211    0.7295
    0.6126    0.9884    0.7400    0.1544    0.1841    0.2243
    0.9900    0.5400    0.2348    0.3813    0.7258    0.2691
    0.5277    0.7069    0.7350    0.1611    0.3704    0.6730
    0.4795    0.9995    0.9706    0.7581    0.8416    0.4775
    0.8013    0.2878    0.8669    0.8711    0.7342    0.6237
    0.2278    0.4145    0.0862    0.3508    0.5710    0.2364
    0.4981    0.4648    0.3664    0.6855    0.1769    0.1771
    0.9009    0.7640    0.3692    0.2941    0.9574    0.8296
    0.5747    0.8182    0.6850    0.5306    0.2653    0.7669
    0.8452    0.1002    0.5979    0.8324    0.9246    0.9345
    0.7386    0.1781    0.7894    0.5975    0.2238    0.1079
    0.5860    0.3596    0.3677    0.3353    0.3736    0.1822
    0.2467    0.0567    0.2060    0.2992    0.0875    0.0991
    0.6664    0.5219    0.0867    0.4526    0.6401    0.4898
    0.0835    0.3358    0.7719    0.4226    0.1806    0.1932
    0.6260    0.1757    0.2057    0.3596    0.0451    0.8959
    0.6609    0.2089    0.3883    0.5583    0.7232    0.0991
    0.7298    0.9052    0.5518    0.7425    0.3474    0.0442
    0.8908    0.6754    0.2290    0.4243    0.6606    0.5573
    0.9823    0.4685    0.6419    0.4294    0.3839    0.7725
    0.7690    0.9121    0.4845    0.1249    0.6273    0.3119
    0.5814    0.1040    0.1518    0.0244    0.0216    0.1790
    0.9283    0.7455    0.7819    0.2902    0.9106    0.3390
    0.5801    0.7363    0.1006    0.3175    0.8006    0.2101
    0.0170    0.5619    0.2941    0.6537    0.7458    0.5102
    0.1209    0.1842    0.2374    0.9569    0.8131    0.9064
    0.8627    0.5972    0.5309    0.9357    0.3833    0.6289
    0.4843    0.2999    0.0915    0.4579    0.6173    0.1015
    0.8449    0.1341    0.4053    0.2405    0.5755    0.3909
    0.2094    0.2126    0.1048    0.7639    0.5301    0.0546
    0.5523    0.8949    0.1123    0.7593    0.2751    0.5013
    0.6299    0.0715    0.7844    0.7406    0.2486    0.4317
    0.0320    0.2425    0.2916    0.7437    0.4516    0.9976
    0.6147    0.0538    0.6035    0.1059    0.2277    0.8116
    0.3624    0.4417    0.9644    0.6816    0.8044    0.4857
    0.0495    0.0133    0.4325    0.4633    0.9861    0.8944
    0.4896    0.8972    0.6948    0.2122    0.0300    0.1375
    0.1925    0.1967    0.7581    0.0985    0.5357    0.3900
    0.1231    0.0934    0.4326    0.8236    0.0871    0.9274
    0.2055    0.3074    0.6555    0.1750    0.8021    0.9175
    0.1465    0.4561    0.1098    0.1636    0.9891    0.7136
    0.1891    0.1017    0.9338    0.6660    0.0669    0.6183
    0.0427    0.9954    0.1875    0.8944    0.9394    0.3433
    0.6352    0.3321    0.2662    0.5166    0.0182    0.9360
    0.2819    0.2973    0.7978    0.7027    0.6838    0.1248
    0.5386    0.0620    0.4876    0.1536    0.7837    0.7306
    0.6952    0.2982    0.7690    0.9535    0.5341    0.6465
    0.4991    0.0464    0.3960    0.5409    0.8854    0.8332
    0.5358    0.5054    0.2729    0.6797    0.8990    0.3983
    0.4452    0.7614    0.0372    0.0366    0.6259    0.7498
    0.1239    0.6311    0.6733    0.8092    0.1379    0.8352
    0.4904    0.0899    0.4296    0.7486    0.2178    0.3225
    0.8530    0.0809    0.4517    0.1202    0.1821    0.5523
    0.8...
4
Pass
 
%%
y_correct = randi(100);
assert(isequal(your_fcn_name,y_correct))
y =
    16
5
Pass
 
%%
y_correct = 'lol';
assert(isequal(your_fcn_name,y_correct))
y =
lol