Cody

Recent Activity

1 – 50 of 4,735

Santosh Kasula submitted a Comment to Problem 58. Tic Tac Toe FTW

@yurenchu - I fixed the test case 1 to start in a new line.

on 14 Jun 2019 at 15:18

MAHMOUD ABDEL-LATIF submitted a Comment to Problem 1809. 05 - Vector Equations 1

copy and paste from test suite

on 12 Jun 2019 at 12:04

Chen Qian submitted a Comment to Problem 62. Elapsed Time

I use format bank to get 2 decimal output, anyone has a better idea?

on 11 Jun 2019 at 21:27

MAHMOUD ABDEL-LATIF submitted a Comment to Problem 2377. Area of a disk

You need to specify that the answer must be rounded to 2 decimal places.

on 11 Jun 2019 at 11:59

William submitted a Comment to Problem 42787. How many ways to write

Unless I am misunderstanding the question, the correct result for x=7 and n=3 is y_correct=21, not 66.

on 10 Jun 2019 at 18:02

William submitted a Comment to Problem 787. Path Optimization thru N words : Time Optimization

I think test suite problem 11 has more correct solutions than are tested for.

on 9 Jun 2019 at 2:53

Carlos Castillo submitted a Comment to Problem 24. Function Iterator

Wow! This was a wild one to throw in this spot, after only 23 sort of basic problems for the ones that do the challenge in this order. Shout out to those fellow members who pointed out to the nested functions documentation. Probably it would help a lot if the explanation was a bit more clear. For example, that thing about "returns a scalar output and an integer n >= 1" is very confusing. The only thing that's returned is the scalar output. Probably you meant that the function takes a scalar input and an integer n>=1—which is actually true—but it's not clear. Another thing, the examples can really be misleading, especially that addTen handle, which doesn't really mean "add ten" but "add one ten times." Anyway, great problem. I see it served as an introduction function handles and nested functions for many, including myself.

on 8 Jun 2019 at 11:48

Sariha Azad submitted a Comment to Problem 174. Roll the Dice!

Someone please explain me the question

on 7 Jun 2019 at 14:56

MAHMOUD ABDEL-LATIF submitted a Comment to Problem 4. Make a checkerboard matrix

The even part n=4 is tricky, Hint: google it

on 6 Jun 2019 at 8:20

Michael Jarboe submitted a Comment to Problem 2635. Higher! Lower!

Emphasized Alfonso Nieto-Castanon Comments "your example ([5 7 8]) is not really following the optimal bisection approach. After you choose 5, the new bounds are not 5 and 10, they are 6 and 10, so your next choice should be 8 ((6+10)/2) instead of 7..."

on 4 Jun 2019 at 19:39

Aris Huang submitted a Comment to Problem 149. Is my wife right?

nooooo way!

on 4 Jun 2019 at 16:46

MAHMOUD ABDEL-LATIF submitted a Comment to Problem 23. Finding Perfect Squares

Cool

on 4 Jun 2019 at 6:19

Dima Panna submitted a Comment to Problem 51. Find the two most distant points

Please add the next test : p = [0,0; 2,1; 2,6; 1,6]; ix_correct = [1 3]; assert(isequal(mostDistant(p),ix_correct)) The solutions of the form: [~,indx]=max(dist(p')); unique(indx) will fail, the last line will return an extra index [1,3,4] instead of just [1,3]

on 3 Jun 2019 at 18:13

Kamran Shafi submitted a Comment to Problem 8. Add two numbers

Easy Start

on 2 Jun 2019 at 8:21

Dima Panna submitted a Comment to Problem 64. The Goldbach Conjecture, Part 2

For some reason the 'nthprime' function is not recognized, however it works for me in my desktop MATLAB.

on 1 Jun 2019 at 8:17

William submitted a Comment to Problem 1184. Hangman (strategy)

The 2nd and 3rd test problems now fail with the error message: Error using evalin Undefined function or variable 'score'. Error in Test2 (line 30) assignin('caller','score',evalin('caller','score')-100+round(a.e/5*100));

on 30 May 2019 at 21:18

Reece Blunt submitted a Comment to Problem 44850. X O X O

Lovely little problem Rayner, look forward to trying Ciaran's

on 30 May 2019 at 16:06

Murugan C submitted a Comment to Problem 2631. Flip the vector from right to left

How can we do for last test case.

on 29 May 2019 at 9:23

Olivia Li submitted a Comment to Problem 60. The Goldbach Conjecture

有中国的小伙伴呀

on 29 May 2019 at 2:27

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.

on 26 May 2019 at 16:33

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?

on 26 May 2019 at 13:47

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

silin yang submitted a Comment to Problem 68. Kaprekar Steps

How it works x = 1?????

on 23 May 2019 at 8:58

Joan Watson 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

Stover Babcock submitted a Comment to Problem 167. Pizza!

yeah! pi*a*z^2

on 17 May 2019

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

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

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

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

Delete.

on 16 May 2019

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

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

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

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

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

The two recursion equations are mixed up.

on 8 May 2019

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

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

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

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

It has been updated.

on 2 May 2019

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

Test problem 21 is faulty.

on 2 May 2019

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

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

...also, how does the assert(numel(moves)==6) work on the problem that has only 3 moves?

on 30 Apr 2019

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

The first test suite problem is troublesome because it requires only 3 moves, and the 3-move solution is not necessarily the first one it finds that has 6 moves or less.

on 30 Apr 2019

William submitted a Comment to Problem 44895. Determine roll pitch yaw angles from a 3D rotation matrix

There is a flaw in the test suite. It tests the values in rpy2r rather than the results rpy from the solver's function. Also, the tolerance needs to be widened a bit.

on 29 Apr 2019

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

The variable name rpy suggests that the order is [roll, pitch, yaw], but that's not correct, is it?

on 27 Apr 2019

Zoltán Nagy submitted a Comment to Problem 69. Find the peak 3n+1 sequence value

Good problem!

on 26 Apr 2019

Peter Corke submitted a Comment to Problem 44892. Create a 3D rotation matrix

Easy to do, what's your reasoning?

on 23 Apr 2019

1 – 50 of 4,735