Cody

Solution 901969

Submitted on 4 Jun 2016
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
r = ones(100); g = zeros(100); b = zeros(100); cdata = cat(3,r,g,b); c1 = [1 0 0]; c2 = [0 0 1]; cdata_new = cat(3,b,g,r); assert(isequal(changeColor(cdata,c1,c2),cdata_new))

cdata_new(:,:,1) = Columns 1 through 16 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 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1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 Columns 17 through 32 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1...

Error using changeColor (line 3) Operands to the || and && operators must be convertible to logical scalar values.

2   Fail
cdata = rand([400,600,3])*0.9; c1 = [0 0.5 1]; c2 = [1 1 1]; assert(isequal(changeColor(cdata,c1,c2),cdata))

cdata_new(:,:,1) = Columns 1 through 9 0.8000 0.8240 0.1444 0.7975 0.5205 0.3473 0.3335 0.6883 0.1048 0.8114 0.4028 0.0518 0.1456 0.8528 0.1374 0.8448 0.3311 0.3100 0.3732 0.5747 0.6569 0.0850 0.2982 0.1767 0.8572 0.8651 0.5074 0.0655 0.1716 0.1227 0.5565 0.5263 0.7793 0.8338 0.5814 0.3566 0.1444 0.0568 0.4806 0.1731 0.7622 0.2134 0.0974 0.5063 0.7531 0.5010 0.1617 0.1775 0.0523 0.5562 0.0000 0.3922 0.4987 0.3137 0.4993 0.2239 0.8395 0.3313 0.3021 0.5201 0.5554 0.2980 0.4202 0.1552 0.4876 0.2397 0.1404 0.5776 0.7680 0.1274 0.1547 0.6426 0.2347 0.7507 0.2681 0.3742 0.6602 0.4268 0.3566 0.6878 0.8133 0.4719 0.2128 0.6362 0.5645 0.6666 0.7131 0.6307 0.0231 0.3089 0.2642 0.5999 0.5782 0.7391 0.0784 0.3430 0.7434 0.5014 0.2239 0.2323 0.8134 0.6512 0.1426 0.0280 0.8802 0.5288 0.4915 0.2604 0.1223 0.0550 0.4640 0.1873 0.7041 0.1144 0.0118 0.3956 0.1739 0.7866 0.4839 0.1907 0.5513 0.5707 0.0409 0.3303 0.5986 0.3955 0.5081 0.8579 0.2305 0.1428 0.0937 0.5935 0.6810 0.1135 0.4977 0.3508 0.5895 0.3967 0.6100 0.7161 0.3718 0.4968 0.3706 0.7279 0.4631 0.7761 0.8399 0.4802 0.4696 0.3857 0.2247 0.0672 0.6671 0.1667 0.1549 0.3158 0.2576 0.3128 0.3488 0.5936 0.6247 0.6627 0.0844 0.5969 0.4081 0.3565 0.5593 0.8503 0.3715 0.7114 0.8243 0.2254 0.6366 0.7089 0.6714 0.0338 0.6941 0.8474 0.1693 0.5282 0.8598 0.3434 0.2912 0.1424 0.2171 0.3862 0.0840 0.4409 0.5486 0.7979 0.3260 0.0219 0.6656 0.8045 0.6923 0.3241 0.1750 0.5479 0.6747 0.5424 0.5695 0.6787 0.7073 0.5474 0.0812 0.4161 0.0286 0.6724 0.7663 0.5990 0.5219 0.5403 0.0805 0.1133 0.6538 0.4860 0.1234 0.0078 0.7977 0.1846 0.4078 0.4208 0.8039 0.7910 0.6500 0.1463 0.6018 0.6919 0.3918 0.2323 0.5690 0.4472 0.5711 0.5006 0.0733 0.7943 0.1016 0.5747 0.0150 0.5824 0.6110 0.6991 0.6083 0.4810 0.4632 0.3910 0.7090 0.8157 0.0409 0.8821 0.2382 0.8950 0.2670 0.8528 0.7810 0.4043 0.6807 0.5773 0.0655 0.7975 0.0886 0.4724 0.1420 0.8723 0.3587 0.3593 0.8551 0.7450 0.7115 0.4572 0.1272 0.8936 0.4003 0.1438 0.5868 0.4436 0.4256 0.2178 0.2460 0.2532 0.8265 0.2751 0.6818 0.7037 0.8894 0.1904 0.1480 0.6357 0.6340 0.4193 0.6858 0.2545 0.7364 0.3931 0.7596 0.8274 0.5722 0.7267 0.3373 0.6473 0.7906 0.8010 0.1004 0.3984 0.7595 0.6366 0.6633 0.6485 0.5592 0.6099 0.0654 0.1925 0.5058 0.5175 0.5188 0.8140 0.5650 0.4683 0.5903 0.7878 0.4603 0.7091 0.5481 0.1110 0.8646 0.7534 0.7724 0.7235 0.4454 0.4261 0.5426 0.3362 0.6571 0.1746 0.6049 0.5741 0.8799 0.3503 0.8145 0.4923 0.7201 0.3679 0.7712 0.7710 0.1308 0.3805 0.8522 0.5129 0.2234 0.8052 0.1478 0.8823 0.8168 0.3462 0.4742 0.8655 0.5444 0.3251 0.2008 0.3264 0.1947 0.4970 0.4699 0.3850 0.3707 0.0100 0.1061 0.7798 0.3337 0.7010 0.8513 0.4558 0.2313 0.0810 0.8152 0.3534 0.2669 0.5154 0.7954 0.8085 0.6923 0.0074 0.6064 0.6527 0.0092 0.7906 0.5035 0.6048 0.8290 0.1548 0.2004 0.1654 0.0693 0.8779 0.7486 0.6685 0.2264 0.0676 0.7177 0.7600 0.6003 0.6290 0.7442 0.5642 0.5618 0.5277 0.4789 0.4410 0.6611 0.7488 0.5936 0.7444 0.4066 0.6934 0.5106 0.2740 0.8650 0.5993 0.7935 0.3632 0.1704 0.3986 0.4667 0.0892 0.5869 0.4158 0.3271 0.7954 0.5633 0.6978 0.3016 0.1274 0.4919 0.2539 0.2650 0.3018 0.4643 0.4749 0.5307 0.1809 0.0370 0.5854 0.2161 0.1814 0.7461 0.7193 0.4704 0.1475 0.3787 0.1516 0.5715 0.8544 0.7148 0.1862 0.8523 0.1375 0.1183 0.8739 0.3762 0.7346 0.2135 0.0974 0.5517 0.2042 0.0138 0.7820 0.6528 0.5922 0.8598 0.3254 0.5332 0.0733 0.6455 0.7731 0.3487 0.5360 0.4891 0.4231 0.6124 0.8442 0.4753 0.2523 0.0659 0.0128 0.6622 0.7415 0.3066 0.8652 0.1489 0.6193 0.2165 0.3735 0.4222 0.0613 0.0568 0.0482 0.2297 0.6178 0.3984 0.5638 0.7973 0.4085 0.4247 0.7740 0.4042 0.4001 0.0562 0.4075 0.1827 0.6719 0.0524 0.3425 0.3083 0.0275 0.6255 0.7601 0.1429 0.3343 0.5836 0.6589 0.4543 0.5066 0.7189 0.2755 0.6652 0.4955 0.0297 0.2519 0.3543 0.3966 0.6209 0.5334 0.7668 0.0538 0.7639 0.1871 0.7206 0.2499 0.3403 0.4993 0.5065 0.7536 0.1601 0.7783 0.0200 0.0577 0.8348 0.6704 0.2576 0.6494 0.0249 0.6681 0.1959 0.3534 0.4280 0.4902 0.8070 0.6900 0.3871 0.3472 0.0382 0.0133 0.3333 0.3224 0.6441 0.8717 0.6654 0.0270 0.2247 0.5241 0.4406 0.6633 0.8743 0.3579 0.5006 0.0413 0.3803 0.0547 0.3991 0.1887 0.6191 0.8641 0.0232 0.1235 0.8836 0.1243 0.0860 0.0149 0.1214 0.8242 0.4387 0.5280 0.5246 0.7780 0.7383 0.7753 0.8214 0.8027 0.5707 0.6461 0.1744 0.4236 0.5254 0.8289 0.4078 0.2346 0.2614 0.5844 0.4223 0.3735 0.8367 0.7334 0.2195 0.1455 0.7806 0.0981 0.7262 0.3221 0.8445 0.1878 0.2377 0.1321 0.4012 0.1476 0.5749 0.5703 0.5087 0.2860 0.2661 0.6235 0.8920 0.0505 0.3838 0.3525 0.2585 0.4511 0.6862 0.3237 0.2489 0.2947 0.5170 0.1220 0.2780 0.7393 0.0341 0.8284 0.0862 0.3121 0.8379 0.4613 0.3050 0.4793 0.4411 0.5501 0.2335 0.1102 0.2004 0.0614 0.1032 0.2960 0.4120 0.3636 0.7071 0.3750 0.2729 0.1535 0.1861 0.0013 0.7745 0.1978 0.4931 0.5634 0.8635 0.1297 0.8170 0.4220 0.8563 0.5706 0.2112 0.6242 0.7514 0.6185 0.2678 0.0677 0.7383 0.2898 0.8064 0.0290 0.4937 0.3397 0.0804 0.8039 0.6059 0.3423 0.4223 0.7446 0.8666 0.1617 0.5311 0.1187 0.8419 0.3679 0.8291 0.8169 0.2985 0.0012 0.8014 0.2566 0.2220 0.0178 0.6922 0.8725 0.3182 0.8623 0.7378 0.8606 0.5994 0.7387 0.5129 0.6857 0.2974 0.6844 0.8219 0.0603 0.4232 0.1137 0.2829 0.8878 0.5138 0.7679 0.6332 0.5631 0.7011 0.4592 0.1748 0.8343 0.7586 0.5043 0.6375 0.5805 0.4443 0.4907 0.3754 0.7958 0.2790 0.0624 0.0503 0.0922 0.7870 0.5923 0.8459 0.3303 0.6831 0.6667 0.1453 0.4332 0.8155 0.8270 0.2202 0.5030 0.5669 0.3036 0.2768 0.6418 0.1163 0.1105 0.1541 0.0529 0.7772 0.7510 0.4558 0.2924 0.2061 0.1018 0.7903 0.5127 0.0327 0.8420 0.1002 0.0543 0.5004 0.8114 0.8534 0.8842 0.8266 0.3460 0.2091 0.4044 0.1602 0.7433 0.5559 0.2875 0.3242 0.5519 0.6081 0.7674 0.7097 0.4766 0.6468 0.8311 0.3160 0.8341 0.2486 0.4425 0.2451 0.4575 0.0057 0.5192 0.7403 0.1165 0.8461 0.6203 0.5188 0.8162 0.4511 0.2713 0.4457 0.6984 0.6446 0.0287 0.5489 0.6135 0.7236 0.7682 0.5492 0.2059 0.2021 0.5173 0.8482 0.1230 0.6115 0.4247 0.3242 0.4993 0.2897 0.6160 0.6424 0.7973 0.4942 0.1874 0.6624 0.7540 0.6865 0.5692 0.4117 0.2464 0.4701 0.0079 0.6541 0.3765 0.4520 0.5821 0.7998 0.5213 0.6693 0.3170 0.1581 0.7034 0.5593 0.2341 0.1678 0.7267 0.6243 0.4662 0.1614 0.0378 0.0376 0.3716 0.6372 0.3109 0.7617 0.3267 0.4926 0.7160 0.8092 0.5164 0.2513 0.4705 0.4493 0.8691 0.3616 0.6077 0.0325 0.3004 0.3802 0.3364 0.7260 0.5572 0.8529 0.3912 0.3491 0.7146 0.5814 0.4031 0.2777 0.1140 0.5100 0.7247 0.7377 0.6938 0.3595 0.1498 0.5882 0.2877 0.8639 0.5737 0.1929 0.5025 0.1028 0.7766 0.7574 0.0792 0.5963 0.4607 0.3308 0.0697 0.3528 0.5823 0.1942 0.0942 0.0141 0.2346 0.0869 0.5107 0.2273 0.6357 0.4652 0.6014 0.1325 0.6682 0.7902 0.6640 0.4056 0.3510 0.4727 0.4761 0.3584 0.8931 0.7319 0.2888 0.6992 0.2464 0.0248 0.4626 0.0361 0.1550 0.6160 0.1929 0.2649 0.1986 0.0125 0.6409 0.2840 0.8826 0.7127 0.6133 0.4692 0.5752 0.7636 0.0671 0.4243 0.0217 0.3778 0.8372 0.5724 0.4829 0.6556 0.0480 0.2134 0.1757 0.4187 0.4778 0.3348 0.2730 0.4795 0.7121 0.6050 0.2038 0.2826 0.2465 0.7869 0.0718 0.0995 0.0939 0.32...

Error using changeColor (line 3) Operands to the || and && operators must be convertible to logical scalar values.

3   Fail
ind = randi(100,[50 1]); c1 = rand([1 3]); c1(3) = 0.95; c2 = [1 1 1]; cdata = rand([100,1,3])*0.8; cdata_new = cdata; for i=1:50 for j=1:3 cdata(ind(i),1,j) = c1(j); cdata_new(ind(i),1,j) = c2(j); end end assert(isequal(changeColor(cdata,c1,c2),cdata_new))

cdata_new(:,:,1) = 0.3514 0.6852 0.6815 0.1012 0.5824 0.5444 0.0677 0.7562 0.0686 0.7350 0.6757 0.6815 0.3246 0.7374 0.7144 0.6815 0.1771 0.2578 0.6815 0.5152 0.4319 0.6383 0.3368 0.3742 0.3545 0.5250 0.6815 0.2297 0.6815 0.6815 0.1509 0.6815 0.7144 0.2471 0.6815 0.6815 0.1860 0.5530 0.6815 0.6815 0.1791 0.1892 0.0049 0.3732 0.2947 0.2292 0.3730 0.3314 0.4256 0.6815 0.6815 0.3462 0.6143 0.7857 0.2711 0.6815 0.6815 0.6815 0.6961 0.3047 0.6815 0.3779 0.1619 0.6815 0.6602 0.6521 0.1958 0.2319 0.0717 0.6815 0.6815 0.5855 0.3810 0.6815 0.6815 0.6815 0.3108 0.6815 0.1473 0.6815 0.7806 0.6815 0.6815 0.6815 0.6815 0.3192 0.0173 0.0041 0.6815 0.6815 0.6815 0.7181 0.0146 0.6815 0.5657 0.6815 0.0872 0.6815 0.6815 0.5360 cdata_new(:,:,2) = 0.7461 0.6735 0.1997 0.1708 0.2474 0.0298 0.5683 0.3806 0.1521 0.4839 0.3309 0.1997 0.0610 0.5335 0.2332 0.1997 0.7003 0.6876 0.1997 0.7799 0.1052 0.6666 0.0025 0.3489 0.6422 0.4081 0.1997 0.1480 0.1997 0.1997 0.0580 0.1997 0.4369 0.1339 0.1997 0.1997 0.6398 0.5334 0.1997 0.1997 0.3967 0.0618 0.1114 0.4622 0.3425 0.2599 0.0776 0.2856 0.5040 0.1997 0.1997 0.1508 0.1679 0.5181 0.3601 0.1997 0.1997 0.1997 0.0528 0.2740 0.1997 0.7138 0.5447 0.1997 0.4845 0.4116 0.1428 0.0215 0.0022 0.1997 0.1997 0.5900 0.6552 0.1997 0.1997 0.1997 0.2091 0.1997 0.5931 0.1997 0.3016 0.1997 0.1997 0.1997 0.1997 0.3098 0.1359 0.1301 0.1997 0.1997 0.1997 0.2007 0.6296 0.1997 0.5513 0.1997 0.5164 0.1997 0.1997 0.4964 cdata_new(:,:,3) = 0.7835 0.4755 0.9500 0.1621 0.2773 0.7352 0.6871 0.0336 0.4577 0.5762 0.2693 0.9500 0.6161 0.3529 0.4231 0.9500 0.5770 0.6897 0.9500 0.4741 0.6154 0.3170 0.1534 0.2776 0.6766 0.6373 0.9500 0.1265 0.9500 0.9500 0.2247 0.9500 0.3860 0.5030 0.9500 0.9500 0.1201 0.3664 0.9500 0.9500 0.2511 0.7971 0.5435 0.2162 0.7292 0.7810 0.1520 0.7707 0.3769 0.9500 0.9500 0.3712 0.3490 0.0273 0.4640 0.9500 0.9500 0.9500 0.2800 0.0634 0.9500 0.7240 0.4813 0.9500 0.4214 0.2461 0.7942 0.0841 0.3237 0.9500 0.9500 0.5731 0.5719 0.9500 0.9500 0.9500 0.1089 0.9500 0.6175 0.9500 0.5079 0.9500 0.9500 0.9500 0.9500 0.1567 0.4647 0.7320 0.9500 0.9500 0.9500 0.1492 0.2151 0.9500 0.7068 0.9500 0.7893 0.9500 0.9500 0.1771

Error using changeColor (line 3) Operands to the || and && operators must be convertible to logical scalar values.