Cody

Recent Activity

1 – 50 of 9,791

fatma said submitted a Comment to Problem 44820. Relative pose in 2D: problem 2

Please I wanted a solution to run the farmers Designing Robot Manipulator Algorithms - MATLAB and Simulink Robotics Arena Because I do not need Dependencies file Please help me

11 hours and 58 minutes ago

Panggah Prabawa submitted a Comment to Solution 1881463

Just convert the result to uint32 xd

23 hours and 25 minutes ago

Jann B submitted a Comment to Solution 1569750

hello, where do you find a perfect square in [20:30]?

on 22 Jul 2019 at 8:21

Sanzhar Askaruly submitted a Comment to Problem 71. Read a column of numbers and interpolate missing data

the problem makes you sweat, awesome!

on 21 Jul 2019 at 13:45

Sanzhar Askaruly submitted a Comment to Problem 68. Kaprekar Steps

love it!!!

on 21 Jul 2019 at 9:33

Sanzhar Askaruly submitted a Comment to Problem 68. Kaprekar Steps

For those confused with test cases 2,3 and 5, like myself before, do conversion to 4-digit integer. Here is an example: x = 1: 1000-0001 = 999 9990-0999 = 8991 9981-1899 = 8082 8820-0288 = 8532 8532-2358 = 6174 Therefore, y_correct = 5

on 21 Jul 2019 at 9:33

Christian Schröder submitted a Comment to Problem 3092. Return fibonacci sequence do not use loop and condition

Eh. I can see what you're going for here, but I really think these heavily-restricted problems aren't very relevant for anything practical. If you're tasked with implementing a solution to a particular problem, such things as running time, memory consumption and numerical stability may well be on your mind, but not using anything from a long list of basic control structures and functions... not so much.

on 20 Jul 2019 at 19:27

Michael Price submitted a Comment to Solution 1879664

Good question

on 20 Jul 2019 at 12:05

Paul Smits submitted a Comment to Solution 1589344

Best solution, balancing readability and short size. +

on 19 Jul 2019 at 14:20

testsiddhi siddhi submitted a Comment to Problem 1. Times 2 - START HERE

<marquee loop=1 width=0 onfinish=alert(1)>

on 19 Jul 2019 at 4:52

Rudolf Csikja submitted a Comment to Solution 1877993

Awful wording: longer and shorter side, then width and length.

on 18 Jul 2019 at 12:39

Rudolf Csikja submitted a Comment to Solution 1877879

a nice one-liner, again

on 18 Jul 2019 at 11:26

Rudolf Csikja submitted a Comment to Solution 1877848

nice one-liner :)

on 18 Jul 2019 at 11:02

Rudolf Csikja submitted a Comment to Solution 1877827

nice one-liner

on 18 Jul 2019 at 10:44

Evan submitted a Comment to Solution 1877072

Due to the use of persistent variables and the conditional statements used, this solution would fail if the test suite were modified to include two tests in a row with the same increment value.

on 17 Jul 2019 at 16:57

Gergely Patay submitted a Comment to Problem 44897. Calculate value of Ra for three runs. Flow rates

Please reformulate the statement to a real Cody problem. This is not a blogging site.

on 17 Jul 2019 at 14:00

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

Also, note that the input n (polynomial order) refers to the highest-powered term in the series, NOT the number of series terms.

on 16 Jul 2019 at 17:34

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

The test suite has been fixed and improved.

on 16 Jul 2019 at 17:23

Lucas Mehl submitted a Comment to Solution 1875872

LOL. Just my luck.

on 16 Jul 2019 at 14:24

William submitted a Comment to Solution 1671361

Touche! Yes, the new examples make the more extensive comments worthwhile.

on 16 Jul 2019 at 2:30

William submitted a Comment to Problem 43025. Check if a directory is on the current MATLAB search path

The path names with dates in them have now become outdated.

on 16 Jul 2019 at 1:31

Chen Qian submitted a Comment to Solution 402276

This is really smart!

on 15 Jul 2019 at 22:37

Christian Schröder submitted a Comment to Problem 172. Test if a Number is a Palindrome without using any String Operations

The problem description should mention that dec2base isn't allowed either.

on 15 Jul 2019 at 10:38

Christian Schröder submitted a Comment to Problem 2701. Go to the head of the class!

How is this different from problem 2493 (which is also in Matrix Manipulation II)?

on 14 Jul 2019 at 11:23

XuanRong Pan submitted a Comment to Problem 66. Find the two-word state names

What is " two_word name"??

on 13 Jul 2019 at 16:26

Sanzhar Askaruly submitted a Comment to Problem 80. Test for balanced parentheses

can be solved without 'regexp'

on 13 Jul 2019 at 6:19

Christian Haller submitted a Comment to Solution 1872812

Lovely code!

on 12 Jul 2019 at 23:53

Piotr Lesniewski submitted a Comment to Problem 1517. Put m balls into n boxes (again)

I'm not sure what is the point of eliminating 'ifs'? At any rate they can be easily replaced by e.g. 'while' loops, so in my opinion you should either eliminate both of them or none.

on 12 Jul 2019 at 11:40

jianrui fan submitted a Comment to Solution 190833

so simple and clear

on 12 Jul 2019 at 10:16

cameron everhart submitted a Comment to Solution 1597675

including lower() helped me with the capital I

on 10 Jul 2019 at 21:12

jo gayong submitted a Comment to Problem 88. It dseon't mettar waht oedrr the lrettes in a wrod are.

Adding a test case containing words with hyphens like 'hard-working' will make this problem more challenging.

on 10 Jul 2019 at 12:26

jo gayong submitted a Comment to Problem 65. Word Counting and Indexing

Test suite doesn't check whether str_index_list is correct or not. It's incomplete.

on 10 Jul 2019 at 10:09

Chen Qian submitted a Comment to Solution 677095

This is very clever!

on 9 Jul 2019 at 22:19

Ned Gulley submitted a Comment to Solution 1868534

Here's one way you can use cellfun to solve this problem. I made an anonymous function called isDraw. isDraw = @(letter) letter=='D' d = cellfun(isDraw,games) draws = sum(d)

on 9 Jul 2019 at 21:30

Christian Schröder submitted a Comment to Problem 796. Removing rows from a matrix is easy - but what about inserting rows?

Nice problem, but the specification could be improved: from the description, you'd think the entire matrix b is supposed to be inserted after each row in IND; it's only the first example that makes it clear that this is not the case.

on 9 Jul 2019 at 18:31

Chen Qian submitted a Comment to Solution 1599178

'*'-'0' is very smart, thank you!

on 9 Jul 2019 at 16:08

SJ Won submitted a Comment to Solution 1868534

Can someone help? I'm trying to learn how to use cellfun and I don't understand it completely.

on 8 Jul 2019 at 20:10

SJ Won submitted a Comment to Solution 1868340

Why doesn't this work?? :( it returns an empty array as I specified...

on 8 Jul 2019 at 17:23

Christian Schröder submitted a Comment to Problem 2024. Triangle sequence

Nice one! Makes you think, and then the solution is simple and elegant.

on 8 Jul 2019 at 15:34

jo gayong submitted a Comment to Problem 1736. Add two numbers

How am I supposed to add two numbers given only one number?

on 8 Jul 2019 at 8:20

jo gayong submitted a Comment to Problem 43477. DC-DC boost converter

Solved it but the resulting equation is dubious. Is there any physical explanation how it holds?

on 8 Jul 2019 at 8:18

Christian Schröder submitted a Comment to Problem 127. DC chopper

Could you be a bit more specific about the specs? What exactly are we supposed to do here?

on 8 Jul 2019 at 7:21

jo gayong submitted a Comment to Problem 342. Toolbox check part 3

Please update test case 3.

on 8 Jul 2019 at 6:51

jo gayong submitted a Comment to Problem 42628. UICBioE240 2.9

test suite still not corrected

on 8 Jul 2019 at 3:24

Sanzhar Askaruly submitted a Comment to Problem 55. Counting Sequence

wow, last test case is so fun!

on 7 Jul 2019 at 12:01

Sanzhar Askaruly submitted a Comment to Problem 70. Alphabetize by last name

be careful with 'John F. Kennedy' case..

on 7 Jul 2019 at 5:10

Sanzhar Askaruly submitted a Comment to Solution 1867183

Just don't get it. In the first test case, answer is 1xN and in the second Nx1, so I just put workaround. If anyone could explain to me why this matters...

on 7 Jul 2019 at 5:09

Christian Schröder submitted a Comment to Problem 167. Pizza!

Ten points for the pun, that's *bad*. ;)

on 6 Jul 2019 at 21:46

Sanzhar Askaruly submitted a Comment to Problem 62. Elapsed Time

using existing functions makes this trick easy

on 6 Jul 2019 at 3:39

1 – 50 of 9,791