Cody

Recent Activity

1 – 50 of 4,927
 Olivia Li submitted a Comment to Solution 1826790 so happy~ 2 hours and 51 minutes ago 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 6 hours and 25 minutes ago Abdul Muneeb submitted a Comment to Solution 1825472 use fix instead of floor or ceil command on 25 May 2019 at 17:51 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 at 22:36 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 at 3:08 Anshil Kumar submitted a Comment to Solution 1824140 h on 23 May 2019 at 18:46 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 at 22:42 William submitted a Comment to Solution 1819357 Test Suite fails. " Error using evalin. Undefined function or variable 'score'." on 18 May 2019 at 14:47 William submitted a Comment to Solution 1818860 This one required a big change in strategy in my case! on 17 May 2019 at 12:56 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 at 15:00 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 at 14:26 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 at 12:04 Bryan Daniels submitted a Comment to Solution 1817260 You need multiple tests to check a variety of situations. on 16 May 2019 at 10:56 xiaoyong submitted a Comment to Solution 1687301 What!!! on 16 May 2019 at 5:28 xiaoyong submitted a Comment to Solution 1815996 Start on 15 May 2019 at 10:52 Isha Desai submitted a Comment to Solution 1813949 You should be able to submit solutions now. Sorry for the inconveniene. on 13 May 2019 at 15:13 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 at 14:25 Xiangbing Jiao submitted a Comment to Solution 471034 Use isnan keyword. isnan(NaN) gives 1 on 11 May 2019 at 5:28 Gregory submitted a Comment to Solution 1812771 s1 = {'this is',... 'a cruel',... 'joke'}; on 11 May 2019 at 1:28 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 at 23:35 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 at 3:43 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 at 10:07 Santosh Kasula submitted a Comment to Solution 1801297 @Harley, MATLAB functions are case sensitive. Did you try lowercase sum? on 1 May 2019 at 11:55 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 at 19:04 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 at 9:37 CHUANQIANG ZHANG submitted a Comment to Solution 24388 Simillar solutions are really cool and concise. on 29 Apr 2019 at 9:34 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 at 9:09 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 goc3 submitted a Comment to Solution 1684038 That's quite the pattern to figure out... on 25 Apr 2019 danteliujie submitted a Comment to Solution 341253 cool solution on 23 Apr 2019 goc3 submitted a Comment to Solution 1790572 Cody utilizes vanilla MATLAB (no toolboxes). on 22 Apr 2019 Yuliano Moscoso Yarin submitted a Comment to Solution 1790644 cool! on 16 Apr 2019 Paul Smits submitted a Comment to Solution 1790572 no function squareform either... pffff on 16 Apr 2019 Paul Smits submitted a Comment to Solution 1790541 Why is there "undefined function 'dist' for input arguments of type 'double'."? Works on my machine (and online matlab too) on 16 Apr 2019 Paul Smits submitted a Comment to Solution 1788385 Funny that 2017a-style double quotations significantly shorter the size as compared to the 2016b-style string() function alternative :) on 15 Apr 2019 Thara Jose submitted a Comment to Solution 1788201 I tried solving this in MATLAB & it gave correct answer for the 3rd test suite also on 15 Apr 2019 danteliujie submitted a Comment to Solution 181619 perfect on 14 Apr 2019 Paul Smits submitted a Comment to Solution 1786296 with functions like nchoosek and primes, it is quite easy on 13 Apr 2019 Paul Smits submitted a Comment to Solution 1786021 Cheating with empty index output on 13 Apr 2019 danteliujie submitted a Comment to Solution 226248 cool on 12 Apr 2019 danteliujie submitted a Comment to Solution 210174 god! on 12 Apr 2019 George Iskander submitted a Comment to Solution 1781233 I couldn't remember interp1 but I formed a very silly code to do the same on 10 Apr 2019 Chris Coote submitted a Comment to Solution 1780440 Elegant brain teaser and a good reminder to always read the question carefully... on 10 Apr 2019 George Iskander submitted a Comment to Solution 1779863 change the output variable to be z on 10 Apr 2019 George Iskander submitted a Comment to Solution 1779834 You have mentioned that the input is 4X4 and then you tested on different dimensions. :( on 9 Apr 2019 danteliujie submitted a Comment to Solution 655485 cool on 8 Apr 2019 danteliujie submitted a Comment to Solution 678164 Like it on 7 Apr 2019 Mehdi BENSEDDIK submitted a Comment to Solution 1319950 Indeed, My code works until the d = 50 because it's a large number, so our algorithm is correct we should not worry about it, I think we have succeed in this challenge. on 4 Apr 2019 Vishal submitted a Comment to Solution 1763626 Test suite does not have similar fashion output. on 27 Mar 2019 Jesús Zambrano submitted a Comment to Solution 1717118 I´m afraid all tests are correct. But thanks anyway! on 23 Mar 2019
1 – 50 of 4,927