Cody

# Recent Activity

51 – 100 of 4,999
 jianrui fan submitted a Comment to Solution 1854983 this is really awesome and impressive.I do learn something on 21 Jun 2019 at 8:29 Willion Bird submitted a Comment to Solution 1852965 function a = bullseye(n) a = 1; for i = 2:(n+1)/2 a = padarray(a, [1,1], i, 'both'); end end Why doesn't this function work? on 20 Jun 2019 at 23:36 Sanzhar Askaruly submitted a Comment to Solution 1852662 returning single value of prime pair instead of vector will help on 20 Jun 2019 at 23:29 Sanzhar Askaruly submitted a Comment to Solution 1848640 wow on 20 Jun 2019 at 22:55 Sanzhar Askaruly submitted a Comment to Solution 694859 hint: recursion on 20 Jun 2019 at 22:28 Sanzhar Askaruly submitted a Comment to Solution 1817575 no regexp is needed actually on 20 Jun 2019 at 22:26 Yashasvi submitted a Comment to Solution 1851925 This code is failing the first case of the test suite (instead of [4 8], only [4] is displayed) but passing the rest. I can't find out what is wrong in it! Any suggestions? on 18 Jun 2019 at 13:37 Yashasvi submitted a Comment to Solution 1849710 What's wrong in this code? on 15 Jun 2019 MAHMOUD ABDEL-LATIF submitted a Comment to Solution 778852 Thanks for the hint on 12 Jun 2019 Sariha Azad submitted a Comment to Solution 1846531 Why doesn't the built in function dec2bin() work here? on 11 Jun 2019 Qiaoli Xie submitted a Comment to Solution 1844328 The test is wrong, the right answer is y_correct = [2 1 3 2]; on 10 Jun 2019 Joseph Manning submitted a Comment to Solution 1842640 bad test. to get the test answer you must square the diameter and multiply it by pi, intead of pi*r^2(or pi*d/2^2) on 8 Jun 2019 MAHMOUD ABDEL-LATIF submitted a Comment to Solution 1558684 Hi, No mistake in test suit 3, a vector can be a column vector or row vector. on 7 Jun 2019 Mariana submitted a Comment to Solution 1840607 Hi all, I just can't find out why the assertion fails. All works well on my MALTAB but not here. Both codes (commented and not) remove only the words which end with 'ain' and leave the two spaces but still the assertions here has failed. on 6 Jun 2019 Yashasvi submitted a Comment to Solution 1840594 What's wrong in this code? on 6 Jun 2019 MAHMOUD ABDEL-LATIF submitted a Comment to Solution 1119521 Thanks for your answer, you had a typo in true, also you should remove ' ' from false and true on 4 Jun 2019 MAHMOUD ABDEL-LATIF submitted a Comment to Solution 1566588 Thanks for the hint on 4 Jun 2019 John Walker submitted a Comment to Solution 1180336 nice on 4 Jun 2019 Jaap Rijnders submitted a Comment to Solution 1836460 hmmm, for the problem to pass, you need to ad 0.001 to a on 3 Jun 2019 A C submitted a Comment to Solution 1829504 Great! on 29 May 2019 josselin LEDENT submitted a Comment to Solution 1828542 Y is no consonnant to me, but ok on 28 May 2019 Abdul Muneeb submitted a Comment to Solution 1826876 i solved it but its size is 62 on 26 May 2019 Olivia Li submitted a Comment to Solution 1826790 so happy~ on 26 May 2019 Olivia Li submitted a Comment to Solution 1439856 Try this！:D c=n; while n>1 if mod(n,2) n =3*n+1; else n =n/2; end c=[c n]; end on 26 May 2019 Abdul Muneeb submitted a Comment to Solution 1825472 use fix instead of floor or ceil command on 25 May 2019 Arif Ullah submitted a Comment to Solution 1825472 The solution which I presented just now works perfectly fine on the live editor of Matlab, but don't know why math works still say it is incorrect? on 24 May 2019 Abdul Muneeb submitted a Comment to Solution 1585578 use if c==sqrt(a^2 + b^2) flag=true else flag=false on 24 May 2019 Anshil Kumar submitted a Comment to Solution 1824140 h on 23 May 2019 Adam Becker submitted a Comment to Solution 548573 I experienced the same thing...was able to generate the output exactly but received a failing score. Did you solve your issue? on 19 May 2019 William submitted a Comment to Solution 1819357 Test Suite fails. " Error using evalin. Undefined function or variable 'score'." on 18 May 2019 William submitted a Comment to Solution 1818860 This one required a big change in strategy in my case! on 17 May 2019 Qinghua Ye submitted a Comment to Solution 1817599 function y = nearZero(x) x = [min(x(x~=0)),x,min(x(x~=0))]; index = find(x == 0); y = max([x(index-1),x(index+1)]); end on 16 May 2019 Qinghua Ye submitted a Comment to Solution 1817575 function y = lengthOnes(x) a = []; idx = [1,find(x=='0') + 1,length(x)+2]; le = length(idx); a(1:le-1) = idx(2:le)-idx(1:le-1)-1; y = max(a); end on 16 May 2019 Bryan Daniels submitted a Comment to Solution 1817413 You need to specify that the answer must be rounded to 2 decimal places. on 16 May 2019 Bryan Daniels submitted a Comment to Solution 1817260 You need multiple tests to check a variety of situations. on 16 May 2019 xiaoyong submitted a Comment to Solution 1687301 What!!! on 16 May 2019 xiaoyong submitted a Comment to Solution 1815996 Start on 15 May 2019 Isha Desai submitted a Comment to Solution 1813949 You should be able to submit solutions now. Sorry for the inconveniene. on 13 May 2019 Qiaoli Xie submitted a Comment to Solution 1813949 Since yesterday, I submit the solution ,and it always shows " While evaluating the solution, the server encountered an error caused by temporary unavailability of MATLAB Service. Wait a few minutes for the MATLAB Service to return, and then rescore." I don't know how to deal with it? on 13 May 2019 Xiangbing Jiao submitted a Comment to Solution 471034 Use isnan keyword. isnan(NaN) gives 1 on 11 May 2019 Gregory submitted a Comment to Solution 1812771 s1 = {'this is',... 'a cruel',... 'joke'}; on 11 May 2019 Gregory submitted a Comment to Solution 1812725 Nobody would do this: [ .25; .05; .10; .01; ] If you are going to demonstrate a concept, do it right - minus tricks! on 10 May 2019 Gregory submitted a Comment to Solution 1811838 Inconsistent behavior - if you are going to make a question like this, make it representative of what would actual be done and not some arbitrary undocumented rules like "replace a two-word state name with a space" on 10 May 2019 Agnish Dutta submitted a Comment to Solution 1802953 a = [0 1 0 0; 0 0 1 0]; c = 2; How is the second one the one with the highest money? The first one has \$ 0.10 whereas, the second has 0.05. a = [ 0 1 2 1; 0 2 1 1]; c = 1; Here too! How is the first one higher? When you evaluate, you get \$ 0.21 for the first one and \$ 0.26 for the second. on 2 May 2019 Santosh Kasula submitted a Comment to Solution 1801297 @Harley, MATLAB functions are case sensitive. Did you try lowercase sum? on 1 May 2019 Harley Butler submitted a Comment to Solution 1801297 I get the correct answers for this, but the website refuses to tell me it is correct. Fix this dumb stuff. on 30 Apr 2019 CHUANQIANG ZHANG submitted a Comment to Solution 1620651 I initially also found that strange. But later I found out the cell structure is different. N by 1 OR 1 by N problem. on 29 Apr 2019 CHUANQIANG ZHANG submitted a Comment to Solution 24388 Simillar solutions are really cool and concise. on 29 Apr 2019 bentzi grinfeld submitted a Comment to Solution 1799547 why this code is not correct? s = summ(v) >> b=s >> s(1)=[] >> c=[[s],0] >> s=[b+c] >> s(end)=[] on 29 Apr 2019 Paul Smits submitted a Comment to Solution 1797786 Too many loops and a long solution. But my brain broke down when trying to do it in 4- or 5-dimensional arrays :') on 26 Apr 2019
51 – 100 of 4,999