Cody

Recent Activity

1 – 50 of 9,485

Daniel Bergman submitted a Comment to Solution 1732920

Any suggestions for improving the test suite would be appreciated!

on 21 Feb 2019 at 19:08

Corentin OGER submitted a Comment to Solution 1732616

I can't make this work on my PC (Matlab 2016 doesn't support double quotes and string arrays)

on 21 Feb 2019 at 15:19

Corentin OGER submitted a Comment to Solution 803327

Haha, well done!

on 21 Feb 2019 at 14:13

Corentin OGER submitted a Comment to Solution 296653

Tried the freepass command on my computer, all I get is Undefined variable "freepass" or class "freepass.please". Also I have no idea how code size is calculated

on 21 Feb 2019 at 14:06

Corentin OGER submitted a Comment to Solution 1546560

Ach! even bigger than mine, you cheater!

on 21 Feb 2019 at 13:57

Corentin OGER submitted a Comment to Solution 1732506

Works for all 70 natural notes between 'C0' (16Hz) and 'B9' (15804Hz)

on 21 Feb 2019 at 12:21

Corentin OGER submitted a Comment to Solution 1732496

Works for all 70 natural notes between 'C0' (16Hz) and 'B9' (15804Hz)

on 21 Feb 2019 at 12:16

Ajay Pattassery submitted a Comment to Problem 94. Target sorting

Good one.

on 21 Feb 2019 at 11:39

Corentin OGER submitted a Comment to Solution 1727061

Only works for tested inputs tried D6 => 147 instead of 1175

on 21 Feb 2019 at 10:23

Corentin OGER submitted a Comment to Problem 146. Tune your guitar

I posted 2 working solutions, they're not the shortest, but at least, they work with ANY input (C0, B10...), not just the tested ones! Almost all working solutions are just a plain lookup tables : boring.

on 21 Feb 2019 at 10:16

Pranav Jonnavithula submitted a Comment to Problem 8. Add two numbers

quick and easy start

on 21 Feb 2019 at 9:04

Harsha Priya Daggubati submitted a Comment to Problem 23. Finding Perfect Squares

fun

on 21 Feb 2019 at 4:59

Fabio Squizzato submitted a Comment to Problem 24. Function Iterator

I don´t believe... I didn´t... Very interesting probleam really, easier to make in paper

on 20 Feb 2019 at 23:46

Corentin OGER submitted a Comment to Problem 167. Pizza!

Took me time to get the joke, since I started with a rounded edge pizza instead of a cylinder. I got: Volume = (a*pi*((a/2 - z)^2 + 2*z^2))/3 Technically more accurate, but clearly not as funny as the intended result... (I suck at math so I had to Google the volume of a barrel shape, and constrain it to : rounding radius = thickness/2, and let the solve function do the algebra for me...)

on 20 Feb 2019 at 16:30

Jesús Zambrano submitted a Comment to Solution 1729873

Very nice solution!!

on 19 Feb 2019 at 15:45

Rayner Saggers submitted a Comment to Solution 1729999

https://www.mathworks.com/matlabcentral/cody/problems/44851 provides a more challenging extension that asks the user to take into account that games end when there's a "win". My first attempt at producing a community problem so thanks for the feedback on improving the test suite.

on 19 Feb 2019 at 11:10

Martin Vatshelle submitted a Comment to Solution 1729999

This is a nice problem, but the solution test suit is poor. To get 126 for n = 3 one need to assume same player always starts. If either player could start we get more solutions. I.E. number of solutions with 4 x's and 5 o's + number of solutions with 5 x's and 4 o's

on 19 Feb 2019 at 8:52

David Barry submitted a Comment to Problem 342. Toolbox check part 3

Test suite needs updating as there is no Simulink.

on 19 Feb 2019 at 0:21

Dyuman Joshi submitted a Comment to Problem 2913. Matlab Basics II - Velocity of a particle

The image is not visible

on 18 Feb 2019 at 18:37

Zain Faruqi submitted a Comment to Problem 12. Fibonacci sequence

easy

on 17 Feb 2019 at 10:44

William submitted a Comment to Problem 44851. X O X Oh!

I'm getting a different answer, by a few, than the test suite.

on 16 Feb 2019 at 16:03

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

The arguments need to be supplied to the function, as in: assert(isequal(your_fcn_name(b, n),y_correct))

on 16 Feb 2019 at 13:43

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

Please fix the test suite.

on 14 Feb 2019 at 16:20

William submitted a Comment to Solution 1725797

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. I don't see 'solutionTest' being used anywhere.

on 14 Feb 2019 at 10:41

Diogo Carvalho submitted a Comment to Problem 413. Back to basics 23 - Triangular matrix

Running this on octave returns the correct results yet the page still says I'm wrong. function y = triangMatrix(x) for i=1:rows(x); for j=1:columns(x); if j>i; x(i,j)=0; else endif endfor endfor disp(x) endfunction

on 14 Feb 2019 at 6:04

Ned Gulley submitted a Comment to Problem 44481. How many Fibonacci numbers?

I went ahead and changed the test suite so the last number can be safely represented as an integer in double precision floating point.

on 14 Feb 2019 at 4:38

Alfonso Nieto-Castanon submitted a Comment to Problem 44728. Nash Equilibrium

could you please break down this problem's testsuite (using "%%" double-comments) to make it a bit easier for players to spot issues in their code? thanks (and very nice problems btw!)

on 14 Feb 2019 at 4:28

Rupesh Gosavi submitted a Comment to Problem 5. Triangle Numbers

It is pretty easy but tricky!

on 14 Feb 2019 at 2:45

James submitted a Comment to Problem 43738. Negative without '-'

JD, I think I figured out why Binbin and I (and more than likely a good number of other players) are having issues with your test suite. I think your "assert(isempty(strfind(filetext, '0')),'0 forbidden')" line is catching everyone who has the digit 0 in their MATLAB ID number. Binbin and I have that, while you do not. I just hacked the test suite, and tried a non-hacking correct answer from Alfonso...with the same result - my solution failed because 0 is forbidden.

on 14 Feb 2019 at 2:16

Aditya Jain submitted a Comment to Solution 1721263

Hi Alfonso, Thank you for your feedback. I will capture this as an enhancement request to discuss further with the Cody Team :) Thanks again.

on 14 Feb 2019 at 2:14

Alexander submitted a Comment to Problem 32. Most nonzero elements in row

easy :) but nice

on 12 Feb 2019 at 17:59

Alexander submitted a Comment to Problem 782. Some Assembly Required

Nice problem!

on 12 Feb 2019 at 17:56

Jesús Zambrano submitted a Comment to Solution 1723352

Nice to see problems like this using Simulink! Congrats!

on 8 Feb 2019 at 21:37

William submitted a Comment to Solution 1723273

The border of zeros is unnecessary. In fact, it is a flaw in the test suite that it regards a case as being "multi-survivor" when one of those survivors is in the border.

on 8 Feb 2019 at 16:49

Burak Bayram submitted a Comment to Solution 1405784

I didn't even tried to do that, but yeah in example it's 8x3 ( n^2-1 x n) matrix but then it asks 32x5 for n=5 ... quite odd

on 8 Feb 2019 at 15:04

Gani submitted a Comment to Problem 32. Most nonzero elements in row

nice

on 8 Feb 2019 at 13:15

Pablo López submitted a Comment to Problem 60. The Goldbach Conjecture

Really interesting the Goldbach conjecture!

on 8 Feb 2019 at 10:25

Athi submitted a Comment to Solution 1670633

Thanks li haitao.

on 7 Feb 2019 at 2:09

Kristóf Nagy submitted a Comment to Problem 2020. Area of an Isoceles Triangle

xd

on 6 Feb 2019 at 21:46

Alfonso Nieto-Castanon submitted a Comment to Problem 44481. How many Fibonacci numbers?

Hi Bob, in the last testsuite problem the last element in your x vector cannot be properly represented using double precision (t will be indistinguishable from similar numbers differing by anything within the last 88 digits). Please either switch to using other suitable representations (e.g. java big integers) or modify the testsuite to keep the values there a bit smaller (double precision can reasonably work with integers below ~1e15 and int64 could go up to ~1e20)

on 6 Feb 2019 at 15:50

Alfonso Nieto-Castanon submitted a Comment to Solution 1721263

Cody seemed to be having a hard time creating a ~2Gb variable here (commented-out line in the this solution code) @CodyTeam: would it be possible (in general) to increase the servers available memory a bit? (of course this is not a big deal, we can always try to work around that)

on 5 Feb 2019 at 17:32

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

awesome!

on 4 Feb 2019 at 21:50

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

awesome!

on 4 Feb 2019 at 21:50

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

awesome!

on 4 Feb 2019 at 21:46

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

awesome!

on 4 Feb 2019 at 21:46

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

awesome!

on 4 Feb 2019 at 21:46

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

awesome!

on 4 Feb 2019 at 21:44

Florian Roscheck submitted a Comment to Problem 68. Kaprekar Steps

I like the recursion aspect of this problem.

on 4 Feb 2019 at 6:21

Natasa submitted a Comment to Solution 1719302

Wow! This took me a couple of days to solve, but I did it and I’m very proud! :D

on 1 Feb 2019 at 22:55

Roberto Rondanelli submitted a Comment to Solution 1717902

Very nice problem for kids and adults alike.

on 30 Jan 2019 at 23:50

1 – 50 of 9,485