Cody

Recent Activity

1 – 50 of 7,169

MathReallyWorks submitted a Comment to Solution 1131383

Hello Matthew Jones, Linspace is similar to the colon operator ":", but gives direct control over the number of points. In x = linspace(1,10,10) you directly enter the number of points and the function generates equally spaced vector but when you use ":" operator, you need to mention step size.

12 hours and 51 minutes ago

Thorsten Bartel submitted a Comment to Problem 68. Kaprekar Steps

The problem should specify that any number with less than four digits should be filled up to four digits with leading zeros. (e.g. 3 -> 0003)

15 hours and 32 minutes ago

Hyatt submitted a Comment to Solution 1194448

There's 45 minutes of my life I won't get back ...

on 21 May 2017 at 21:31

Hyatt submitted a Comment to Solution 1194270

This is the actual, sans regexp, size of the leading solution: 25

on 21 May 2017 at 18:54

Hyatt submitted a Comment to Solution 1194268

using convolution

on 21 May 2017 at 18:50

Hyatt submitted a Comment to Solution 1194256

The MATLAB service for this has been unavailable for the past couple of days.

on 21 May 2017 at 18:24

yurenchu submitted a Comment to Problem 44208. Where's Waldo?

Interesting and fun problem! How about a test case with 'Waldo' hiding in an antidiagonal, or in reverse order in a diagonal?

on 21 May 2017 at 15:51

UnCroissant submitted a Comment to Solution 1147941

sort(x) will always return a increasing vector. So all(diff(sort(x)))>0 is always true, if x has just unique elements. try all((diff(x))>0)

on 21 May 2017 at 13:17

Andrew Newell submitted a Comment to Problem 2159. A SUBSREF variant that accepts the 'end'-operator.

Pity that eval is forbidden - I had quite an elegant solution using it.

on 20 May 2017 at 5:53

yeungor submitted a Comment to Solution 366927

I don't think you should hard code the lists you should be constructing. Regex is fine, but you're limiting yourself by making such a narrow solution. I personally don't like the regex solution because I'm trying to find interesting things about the language and I don't want to run through and find the shortest non regexp.

on 19 May 2017 at 20:27

Andrew Newell submitted a Comment to Solution 208042

I would love to know how you came up with that.

on 18 May 2017 at 4:40

Andrew Newell submitted a Comment to Solution 1191720

I confess, I found the results using intlinprog.

on 18 May 2017 at 4:18

Andrew Newell submitted a Comment to Problem 2836. Modify subscripts - easier

Whatever the problem is, it went away.

on 17 May 2017 at 16:34

Hyatt submitted a Comment to Problem 1321. Given a 4x4 matrix, swap the two middle columns

This is a poor question in that it tells you to swap the middle two columns of a 4x4 matrix, but then tests things other than than 4x4 matrices. You'll have to study the test cases and the given answers to see what the test maker is really after here :(

on 17 May 2017 at 7:31

Aakash Sharma submitted a Comment to Problem 44207. Area of square

good problem.....keep it up!

on 16 May 2017 at 17:02

M'sila Team submitted a Comment to Solution 1190124

x must be 122

on 16 May 2017 at 11:26

Richard Zapor submitted a Comment to Problem 1512. Clock Solitaire

Please add a test case that kills my invalid leading solution. I misinterpreted the wiki page for sequencing which I thought was random choice to produce a 1 in 13 probability.

on 14 May 2017 at 19:01

Andrew Newell submitted a Comment to Solution 659287

I like the conceptual clarity of this one.

on 14 May 2017 at 0:52

Hyatt submitted a Comment to Solution 1187903

I've gotten this error message for the last few weeks. Is this test set (Indexing I) down permanently? --------- 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.

on 13 May 2017 at 16:28

M'sila Team submitted a Comment to Solution 1187551

nfo 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.

on 12 May 2017 at 23:03

T. Dunker submitted a Comment to Solution 88806

This solution would fail e.g. on a column vector a = randi(10, 100,1)

on 11 May 2017 at 13:33

T. Dunker submitted a Comment to Solution 1186148

This solution passes the test cases, yet it fails in general.

on 11 May 2017 at 13:21

M'sila Team submitted a Comment to Solution 1186076

I think results must be 15, 18 not 14, 17

on 11 May 2017 at 11:26

Hyatt submitted a Comment to Solution 1185914

Is it supposed to be sorted in ascending or descending order? I'll just pick randomly ...

on 11 May 2017 at 6:09

Jan Orwat submitted a Comment to Problem 2836. Modify subscripts - easier

Hi Andrew, I will check it out.

on 10 May 2017 at 6:25

Andrew Newell submitted a Comment to Problem 2836. Modify subscripts - easier

However, when I ran it on Cody, I got "Something went wrong. Please check your code for errors and try again later."

on 9 May 2017 at 16:43

Andrew Newell submitted a Comment to Problem 2836. Modify subscripts - easier

Are they still allowing classes? My solution passed all the tests on my computer.

on 9 May 2017 at 15:28

Matthew Eicholtz submitted a Comment to Solution 1184490

Please expand the test suite so that solutions like this do not work.

on 9 May 2017 at 15:27

Matthew Eicholtz submitted a Comment to Problem 43154. Basics - not so easy division

Why return 'ERROR' when the result is 0? Doesn't seem like an error to me.

on 9 May 2017 at 15:16

Andrew Newell submitted a Comment to Solution 1183879

Sorry, I mean the Magic Numbers badge.

on 9 May 2017 at 0:56

Andrew Newell submitted a Comment to Solution 1183879

Since I created the problem series and want the Functions I badge, I thought I'd provide the solution that incorporates vampire_factor and are_fangs. Not a great score, but readable!

on 9 May 2017 at 0:53

M'sila Team submitted a Comment to Problem 44104. Hilbert Scan Algorithm

huashou thank you for replied me for this mistake, so it's now clear have a good day.

on 8 May 2017 at 22:41

UnCroissant submitted a Comment to Solution 1183475

Interesting. If you leave the 'ComparisonMethod','abs' it's still correct (size is 13). Though, I believe this is the shortest, universally correct solution.

on 8 May 2017 at 18:03

James submitted a Comment to Problem 1215. Diophantine Equations (Inspired by Project Euler, problem 66)

The 2s at the end of 649 and 180 used to be superscripts. I'm not quite sure when that changed, but it is fixed now. Thanks for the heads up on that.

on 8 May 2017 at 12:01

Hyatt submitted a Comment to Solution 1183099

Too bad the test suite doesn't provide some tolerance for testers wanting to precalculate the constant scalar values (e.g. 1/sqrt(...)) as 0.159576912160573.

on 8 May 2017 at 3:13

Hyatt submitted a Comment to Problem 106. Weighted average

In case you actually want to try a weighted average problem, you can check out the one here https://www.mathworks.com/matlabcentral/cody/problems/44156-weighted-average

on 8 May 2017 at 0:37

UnCroissant submitted a Comment to Problem 11. Back and Forth Rows

Really enjoyed this one.

on 7 May 2017 at 14:18

Thorsten Bartel submitted a Comment to Problem 355. Back to basics 11 - Max Integer

The kind of problem where the test suite just gives away the answer.

on 7 May 2017 at 2:07

yurenchu submitted a Comment to Solution 1180413

This works under the presumption that IND is already sorted (as is the case in the test suite).

on 5 May 2017 at 15:42

yurenchu submitted a Comment to Solution 193625

Nice trick! But it breaks when IND contains 0s (inserting rows at the top of the matrix).

on 5 May 2017 at 15:33

Thorsten Bartel submitted a Comment to Problem 15. Find the longest sequence of 1's in a binary sequence.

Nice one, didn't think it was possible to do in one line initially...

on 5 May 2017 at 14:31

goc3 submitted a Comment to Problem 44141. Determine whether the number is multiple of 3 or not

Nine additional test cases have been added and the problem is set to be rescored.

on 4 May 2017 at 13:55

yurenchu submitted a Comment to Problem 44144. Duration of a trip in minutes

Thanks for correcting the issue. I still wonder why it occurred though. (I've noticed the same issue with solution lists of other Cody problems.)

on 4 May 2017 at 3:40

Andrew Newell submitted a Comment to Problem 43665. Use a timetable to analyze a train timetable (Part 2)

The problem statement is incomplete. What happens if there is no train before 9:00?

on 4 May 2017 at 0:16

Isha Desai submitted a Comment to Problem 44144. Duration of a trip in minutes

Corrected the issue, the list is now showing 14 solutions.

on 3 May 2017 at 19:41

Mehmet OZC submitted a Comment to Problem 44144. Duration of a trip in minutes

I also wonder why?

on 3 May 2017 at 19:13

yurenchu submitted a Comment to Solution 1179203

Why does your second, correct solution not appear in the list?

on 3 May 2017 at 16:44

yurenchu submitted a Comment to Problem 44144. Duration of a trip in minutes

Why does the list show only 13 of the (currently) 14 submitted solutions?

on 3 May 2017 at 16:40

1 – 50 of 7,169