Cody

Recent Activity

1 – 50 of 9,644

Abdul Muneeb submitted a Comment to Solution 1826876

i solved it but its size is 62

5 hours and 10 minutes ago

Olivia Li submitted a Comment to Solution 1826790

so happy~

8 hours and 41 minutes ago

William submitted a Comment to Problem 44848. Approximate the inverse tangent by power series

There is still a problem with the test suite. The quantity ff is not defined in test suite problems 2 and 3.

9 hours and 18 minutes ago

Osman submitted a Comment to Problem 1966. Kaggle: Reverse Game of Life - Single Move to One Cell Case

Is it possible to correct the test suite? I have 8 cases where they are not accepted by test suite even though they evolve to having one cell. Apart from that, is the minimum achievable score 0?. i.e. are there 600 combinations ending with one cell? Since even if I solve the problem mentioned in my first paragraph, I end up with 552 cases ending with one cell. Can someone please enlighten me on this?

12 hours and 5 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

12 hours and 15 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

Rainaire Hansford submitted a Comment to Problem 1713. Can you beat the lottery?

When i run the program it says fn is undefined. Please explain

on 24 May 2019 at 20:29

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

silin yang submitted a Comment to Problem 68. Kaprekar Steps

How it works x = 1?????

on 23 May 2019 at 8:58

TIANJIAO YU submitted a Comment to Problem 22. Remove the vowels

nice

on 22 May 2019 at 3:29

Michael Daly submitted a Comment to Problem 167. Pizza!

pi*z^2*a

on 21 May 2019 at 10:39

arda ertuna submitted a Comment to Problem 42. Find the alphabetic word product

Could you send me the answer? I had benn worked for 1 week but Icouldnt find answer. İf anyone solves Please send answer. Really I need it.

on 20 May 2019 at 23:37

Praful Tondomker submitted a Comment to Problem 4. Make a checkerboard matrix

Good problem. Helps to understand the uses of logical operators.

on 20 May 2019 at 5:13

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

Stover Babcock submitted a Comment to Problem 167. Pizza!

yeah! pi*a*z^2

on 17 May 2019 at 16:37

goc3 submitted a Comment to Problem 44753. Lights Out 3 - 5x5, 6 moves

@Jean-Marie Sainthillier: Amazing. I'll have to make sure that some later problems in the series can't be brute forced, even by him, though he may still find a way. These test suites take long enough to create as it is.

on 17 May 2019 at 13:19

goc3 submitted a Comment to Problem 111. Find matching parenthesis

@Qianqian Fang: once you've solved a problem, click on the solution map (containing all the green circles and orange x's). On that separate page you can click on each of the shapes to view each solution below the chart.

on 17 May 2019 at 13:06

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

Jean-Marie Sainthillier submitted a Comment to Problem 2910. Mersenne Primes vs. All Primes

Hello Grant, I don't know if it's a lot of work but it could be a good idea to add a Prime Numbers group 2 with more difficult problems. I think about beautiful Ned's problems (primes ladders, Longest prime diagonal, Twins in a window ...).

on 16 May 2019 at 13:16

Bryan Daniels submitted a Comment to Problem 1736. Add two numbers

Delete.

on 16 May 2019 at 13:14

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

YIFEI ZHANG submitted a Comment to Problem 2. Make the vector [1 2 3 4 5 6 7 8 9 10]

Why did I copy the code to the matlab editor and run it but the command line window says I didn't define a function or variable?

on 15 May 2019 at 6:58

Jean-Marie Sainthillier submitted a Comment to Problem 44753. Lights Out 3 - 5x5, 6 moves

@goc3 To be clear, I speak about Solution 1720010 of Alfonso (https://www.mathworks.com/matlabcentral/cody/problems/44755-lights-out-4-5x5-8-moves/solutions/1720010). Incredible no ?

on 14 May 2019 at 18:23

Jean-Marie Sainthillier submitted a Comment to Problem 44753. Lights Out 3 - 5x5, 6 moves

@goc3 With brute-force Alfonso solution you can solve everything, everywhere, every time...

on 14 May 2019 at 14:40

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

William submitted a Comment to Problem 1672. Leftovers? Again?!

I have a solution that solves all of the test cases, but when I run it against the test suite it produces "Error using builtin Undefined function or variable 'solutionTest'." for each case.

on 10 May 2019 at 13:47

Márk Barta submitted a Comment to Problem 17. Find all elements less than 0 or greater than 10 and replace them with NaN

More usefull than I thougth

on 10 May 2019 at 8:18

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

William submitted a Comment to Problem 42496. Arithmetic/geometric sequence, 50/50

The two recursion equations are mixed up.

on 8 May 2019 at 11:35

Qianqian Fang submitted a Comment to Problem 111. Find matching parenthesis

wondering if there is a place I can review the submitted solution source codes? I think this is a great place to learn about matlab programming.

on 6 May 2019 at 21:05

Thabo Komane submitted a Comment to Problem 42485. Eliminate Outliers Using Interquartile Range

But why, in your example< do you say that 1.5 * (54-50.5)= 4.5 ? shouldn't this be 5.25?

on 4 May 2019 at 22:35

William submitted a Comment to Problem 44893. Create a 3D rotation matrix from roll-pitch-yaw angles

Oh, I see. You have defined the yaw to be around the x-axis, and the roll to be around the z-axis. But there is still a problem with test case 4. I think it should be [-1,-2,0] rather than [1,-2,0].

on 4 May 2019 at 16:24

goc3 submitted a Comment to Problem 44761. Lights Out 9 - 5x5, light-only solution? II

It has been updated.

on 2 May 2019 at 12:12

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

William submitted a Comment to Problem 44761. Lights Out 9 - 5x5, light-only solution? II

Test problem 21 is faulty.

on 2 May 2019 at 0:58

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

goc3 submitted a Comment to Problem 44764. Lights Out 10 - 5x5, with wrapping, 6 moves

@William: the troublesome test case has been removed. Thanks for pointing that out.

on 30 Apr 2019 at 11:32

1 – 50 of 9,644