Cody

Problem 183. Pull the variable y_correct from the Caller's Workspace

Solution 125975

Submitted on 9 Aug 2012 by Richard Zapor
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
%% y_correct = 1; assert(isequal(your_fcn_name,y_correct))

ans = 1

2   Pass
%% y_correct = 1:100; assert(isequal(your_fcn_name,y_correct))

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

ans = Columns 1 through 6 0.7688 0.5637 0.4069 0.1160 0.1962 0.3357 0.3395 0.6745 0.5614 0.5800 0.4166 0.4904 0.0512 0.5228 0.8062 0.9183 0.2818 0.2811 0.7529 0.5505 0.2799 0.6763 0.1582 0.3883 0.7032 0.0882 0.9474 0.4621 0.5088 0.6975 0.9635 0.4588 0.5443 0.1043 0.4556 0.7125 0.7714 0.9575 0.2051 0.5750 0.5102 0.7146 0.7195 0.4004 0.3830 0.2110 0.2154 0.0230 0.1434 0.8888 0.2809 0.1316 0.5832 0.1820 0.9886 0.7827 0.5722 0.8916 0.7074 0.0227 0.5778 0.1813 0.1826 0.2946 0.6300 0.9851 0.6008 0.5884 0.2835 0.1974 0.6873 0.9787 0.7106 0.5758 0.7472 0.1703 0.6893 0.6951 0.7333 0.1970 0.9058 0.0414 0.3232 0.2892 0.3841 0.3628 0.1257 0.6042 0.4110 0.6238 0.6164 0.3929 0.0088 0.2015 0.2722 0.6826 0.5459 0.2869 0.6678 0.8370 0.3039 0.8137 0.4854 0.0930 0.1052 0.6800 0.8692 0.1042 0.1681 0.3384 0.3184 0.5228 0.6144 0.7346 0.4273 0.6449 0.8835 0.3133 0.6029 0.1963 0.7073 0.1223 0.9006 0.9119 0.0640 0.1422 0.1634 0.5662 0.4264 0.8186 0.0578 0.7090 0.3220 0.5838 0.4597 0.8291 0.3861 0.9321 0.8693 0.1016 0.8946 0.0025 0.3781 0.0868 0.3013 0.2810 0.1373 0.7721 0.5574 0.9471 0.9584 0.3796 0.0408 0.7915 0.7343 0.6734 0.9407 0.3431 0.2347 0.1159 0.5732 0.4163 0.6639 0.6327 0.9452 0.3446 0.4336 0.6146 0.4288 0.3144 0.4740 0.1848 0.0935 0.0012 0.0278 0.9777 0.7697 0.7516 0.8141 0.0353 0.2298 0.3228 0.6298 0.8503 0.9389 0.4901 0.1869 0.6670 0.1107 0.1309 0.0535 0.5874 0.3880 0.8308 0.7371 0.4599 0.1808 0.1277 0.4599 0.5958 0.7616 0.6465 0.2057 0.1035 0.3319 0.0324 0.8839 0.7115 0.3748 0.0007 0.1222 0.5711 0.4147 0.6439 0.1055 0.9786 0.9703 0.6995 0.1424 0.5013 0.4257 0.4402 0.6874 0.6647 0.8732 0.8273 0.9524 0.0357 0.7161 0.4383 0.4561 0.4067 0.7418 0.1761 0.0726 0.7515 0.7669 0.7903 0.2707 0.2033 0.4445 0.1236 0.0636 0.0209 0.3822 0.1733 0.4781 0.4120 0.2655 0.7658 0.6241 0.5139 0.9031 0.8074 0.0339 0.2722 0.2727 0.1317 0.9430 0.8210 0.1891 0.1022 0.3130 0.1432 0.9046 0.0600 0.6140 0.3783 0.9593 0.6740 0.8856 0.9255 0.7957 0.5865 0.9882 0.9284 0.1568 0.8469 0.2138 0.8636 0.7039 0.5392 0.4086 0.3360 0.4425 0.1345 0.2934 0.9809 0.8492 0.4439 0.9802 0.4857 0.0954 0.7370 0.6357 0.4041 0.3817 0.0453 0.8832 0.7522 0.1755 0.3371 0.3134 0.7858 0.8995 0.0589 0.6355 0.4776 0.7952 0.8847 0.0217 0.4068 0.9443 0.7985 0.4060 0.4390 0.8176 0.6567 0.3725 0.1166 0.2413 0.5211 0.1725 0.1643 0.7030 0.7431 0.5894 0.4187 0.8213 0.3174 0.7314 0.8600 0.6926 0.9082 0.8935 0.6443 0.9192 0.8619 0.6243 0.0605 0.8875 0.0809 0.5160 0.9548 0.8755 0.5815 0.2767 0.4999 0.2205 0.7793 0.9433 0.7115 0.5913 0.4300 0.1874 0.8592 0.1565 0.6994 0.5499 0.6983 0.1665 0.4813 0.2198 0.7345 0.7247 0.8589 0.6298 0.2045 0.2857 0.6441 0.7508 0.3513 0.3113 0.9087 0.8576 0.3400 0.4046 0.5190 0.6642 0.2135 0.3068 0.3685 0.2843 0.8132 0.7288 0.9024 0.3524 0.8615 0.1131 0.1220 0.0896 0.2214 0.4245 0.6643 0.4818 0.0403 0.6791 0.6602 0.8838 0.8783 0.0391 0.6616 0.6913 0.8906 0.8100 0.9674 0.1391 0.6536 0.5342 0.5770 0.4020 0.9215 0.4882 0.9251 0.2344 0.7549 0.2848 0.2827 0.1219 0.8458 0.0583 0.4257 0.5208 0.0474 0.6072 0.4824 0.1080 0.6901 0.0244 0.3153 0.3365 0.4735 0.2347 0.0597 0.7580 0.9997 0.0223 0.9456 0.9102 0.4085 0.5113 0.2090 0.7004 0.3118 0.8377 0.5559 0.3481 0.0670 0.8693 0.3514 0.8605 0.8239 0.0602 0.3691 0.2745 0.7401 0.2471 0.2950 0.0270 0.5472 0.3823 0.5764 0.2652 0.9602 0.7007 0.1456 0.0494 0.9508 0.0862 0.0231 0.6971 0.4663 0.0114 0.7292 0.1140 0.1174 0.4917 0.4889 0.1742 0.6652 0.6074 0.4552 0.3838 0.7499 0.1498 0.4020 0.0746 0.0116 0.5671 0.9143 0.5395 0.0067 0.2512 0.7764 0.4287 0.1590 0.6363 0.6963 0.1975 0.2664 0.3986 0.4174 0.7842 0.2251 0.3304 0.3554 0.9593 0.1668 0.7151 0.8948 0.4308 0.0388 0.0323 0.9384 0.5120 0.7241 0.0387 0.3901 0.8931 0.1512 0.0259 0.7712 0.6110 0.9655 0.4895 0.8902 0.2739 0.0106 0.1902 0.3082 0.7877 0.6092 0.5176 0.3995 0.8518 0.6056 0.0741 0.7014 0.1514 0.6077 0.8857 0.1155 0.0449 0.7646 0.8634 0.8340 0.1865 0.0508 0.9701 0.3963 0.3356 0.9352 0.5742 0.5969 0.2544 0.7848 0.7475 0.8913 0.0026 0.9511 0.2778 0.9548 0.6725 0.5252 0.0267 0.8879 0.1019 0.6288 0.9348 0.5578 0.5717 0.2089 0.5730 0.2139 0.6662 0.7765 0.9111 0.4810 0.2419 0.2768 0.0524 0.1313 0.1490 0.8344 0.7697 0.5104 0.7380 0.0079 0.2859 0.2234 0.7752 0.1768 0.4578 0.3760 0.9195 0.4839 0.3091 0.7618 0.8961 0.9503 Columns 7 through 12 0.9117 0.2647 0.1035 0.0775 0.6549 0.6606 0.3977 0.0160 0.5159 0.0976 0.3589 0.9660 0.5605 0.0317 0.9773 0.1509 0.7516 0.5270 0.8515 0.7841 0.1299 0.0448 0.0253 0.0941 0.7320 0.2655 0.3922 0.6213 0.5981 0.8103 0.4954 0.8637 0.2801 0.2362 0.4336 0.3388 0.6448 0.4402 0.7102 0.6525 0.6017 0.2164 0.5300 0.7625 0.7192 0.7609 0.4718 0.4783 0.8035 0.9933 0.8590 0.3792 0.0677 0.3955 0.9875 0.0153 0.9042 0.0348 0.5349 0.2684 0.6865 0.4423 0.0354 0.5210 0.2922 0.2392 0.6825 0.2067 0.9723 0.1224 0.1482 0.3174 0.5105 0.5081 0.6429 0.4033 0.7500 0.4240 0.0466 0.5853 0.8679 0.0295 0.4308 0.6229 0.8577 0.3344 0.2243 0.6913 0.0063 0.6798 0.8869 0.0124 0.5300 0.3264 0.6516 0.9161 0.1718 0.8377 0.5452 0.9498 0.3032 0.5286 0.2506 0.5441 0.6346 0.0624 0.3162 0.3770 0.0922 0.8137 0.1210 0.3013 0.8308 0.3439 0.6221 0.1463 0.2462 0.9973 0.8530 0.2299 0.1187 0.0113 0.0164 0.7724 0.1485 0.7484 0.2365 0.7612 0.8119 0.3213 0.7794 0.7607 0.5486 0.3540 0.8167 0.4147 0.2836 0.0053 0.4161 0.7461 0.9253 0.0301 0.1531 0.6809 0.7972 0.7367 0.7525 0.2899 0.4719 0.5551 0.2878 0.7162 0.4983 0.9456 0.4848 0.0888 0.0846 0.6305 0.7125 0.7256 0.4587 0.0380 0.1708 0.7778 0.1092 0.4713 0.1637 0.0600 0.7803 0.9625 0.8061 0.4102 0.8015 0.0669 0.1929 0.3429 0.3915 0.5379 0.9955 0.6082 0.9031 0.5421 0.2423 0.1502 0.7650 0.6280 0.1062 0.3518 0.6453 0.7584 0.8971 0.9396 0.7039 0.6127 0.4607 0.5859 0.1968 0.0026 0.7403 0.9982 0.3369 0.7017 0.8884 0.4579 0.7687 0.6020 0.0773 0.6939 0.0254 0.2129 0.6050 0.0178 0.0403 0.9785 0.0286 0.6722 0.7962 0.4160 0.9499 0.3484 0.0804 0.7719 0.7272 0.0785 0.9737 0.0082 0.5743 0.8128 0.8539 0.1314 0.3691 0.8298 0.5307 0.5996 0.2181 0.1017 0.2317 0.3638 0.7074 0.8924 0.6703 0.7218 0.7112 0.5041 0.1404 0.8734 0.6086 0.4463 0.8821 0.6922 0.8723 0.8739 0.0387 0.2138 0.2424 0.6829 0.7470 0.7804 0.3762 0.6497 0.3140 0.7702 0.8737 0.6445 0.9321 0.8301 0.5174 0.6651 0.4570 0.7424 0.3707 0.7995 0.1854 0.5259 0.0678 0.6633 0.9591 0.0498 0.3021 0.9103 0.2820 0.1245 0.1635 0.0994 0.2139 0.4281 0.1584 0.0832 0.1882 0.4562 0.6066 0.9690 0.8925 0.8877 0.2009 0.1478 0.3182 0.3179 0.0563 0.3991 0.6867 0.8819 0.5030 0.3821 0.1129 0.4967 0.0005 0.5707 0.8269 0.8138 0.8761 0.7973 0.6776 0.3081 0.8308 0.9821 0.4663 0.8401 0.6491 0.0345 0.3101 0.9595 0.4565 0.0704 0.1752 0.2921 0.5099 0.4896 0.2981 0.2796 0.3603 0.9930 0.3628 0.9234 0.2714 0.1191 0.2151 0.3206 0.6638 0.0195 0.2510 0.3781 0.5776 0.1645 0.6737 0.8680 0.4037 0.1657 0.3554 0.9186 0.8578 0.6641 0.5159 0.0302 0.0336 0.5646 0.1122 0.2874 0.4254 0.2860 0.9550 0.4661 0.2345 0.6851 0.0067 0.0638 0.9041 0.0281 0.4122 0.4352 0.9622 0.9704 0.3498 0.8454 0.6538 0.4978 0.0298 0.2065 0...

4   Pass
%% y_correct = randi(100); assert(isequal(your_fcn_name,y_correct))

ans = 29

5   Pass
%% y_correct = 'lol'; assert(isequal(your_fcn_name,y_correct))

ans = lol