Cody

Recent Activity

1 – 50 of 9,586

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

Easy to do, what's your reasoning?

8 hours and 47 minutes ago

Stephen Little submitted a Comment to Problem 963. We love vectorized solutions. Problem 1 : remove the row average.

Timing aspect is neat.

10 hours and 57 minutes ago

Paul Morant submitted a Comment to Problem 44892. Create a 3D rotation matrix

You should think about having an input variable rather than describing it as only -90 degrees in the description.

16 hours and 49 minutes ago

danteliujie submitted a Comment to Solution 341253

cool solution

22 hours and 20 minutes ago

goc3 submitted a Comment to Problem 44752. Lights Out 2 - 5x5, 4 moves

@Jean-Marie Sainthillier: thanks. https://www.mathworks.com/matlabcentral/cody/groups/624 More problems will be coming in this series.

on 22 Apr 2019 at 16:16

goc3 submitted a Comment to Problem 174. Roll the Dice!

@jiangming wang: Cody utilizes vanilla MATLAB (no toolboxes).

on 22 Apr 2019 at 15:17

goc3 submitted a Comment to Solution 1790572

Cody utilizes vanilla MATLAB (no toolboxes).

on 22 Apr 2019 at 15:11

Dani Péter submitted a Comment to Problem 2024. Triangle sequence

so interesting!

on 20 Apr 2019 at 22:12

Yuliano Moscoso Yarin submitted a Comment to Solution 1790644

cool!

on 16 Apr 2019 at 15:47

Paul Smits submitted a Comment to Solution 1790572

no function squareform either... pffff

on 16 Apr 2019 at 14:27

Paul Smits submitted a Comment to Solution 1790541

Why is there "undefined function 'dist' for input arguments of type 'double'."? Works on my machine (and online matlab too)

on 16 Apr 2019 at 14:02

Paul Smits submitted a Comment to Solution 1788385

Funny that 2017a-style double quotations significantly shorter the size as compared to the 2016b-style string() function alternative :)

on 15 Apr 2019 at 8:44

Thara Jose submitted a Comment to Solution 1788201

I tried solving this in MATLAB & it gave correct answer for the 3rd test suite also

on 15 Apr 2019 at 5:38

danteliujie submitted a Comment to Solution 181619

perfect

on 14 Apr 2019 at 11:21

Paul Smits submitted a Comment to Problem 61. Find state names that end with the letter A

@Kiran Ramsaroop, instructions are to remove state names, not spaces. It may seem silly to want this, but it is accurate. Thus only spaces that are part of a removed state name should be removed.

on 14 Apr 2019 at 9:20

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

cool

on 13 Apr 2019 at 18:56

Paul Smits submitted a Comment to Solution 1786296

with functions like nchoosek and primes, it is quite easy

on 13 Apr 2019 at 15:02

Paul Smits submitted a Comment to Solution 1786021

Cheating with empty index output

on 13 Apr 2019 at 0:53

danteliujie submitted a Comment to Solution 226248

cool

on 12 Apr 2019 at 16:45

Oliver Warlow submitted a Comment to Problem 174. Roll the Dice!

Anyone want to tell me the odds of correctly completing the problem, and then having the checker reject it? Because i have a screenshot of my solution being rejected. Tried exactly the same again and it passed.

on 12 Apr 2019 at 13:26

Kiran Ramsaroop submitted a Comment to Problem 61. Find state names that end with the letter A

This is a bizarre one - test case is dependent on how many spaces are between the state names, which points to a specific solution having to be used rather than a solution that makes sense to the user. Additionally, I have noticed a stange effect in 19a when I use "join". My solution has too few spaces between "Delaware" and "Hawaii", so I thought I'd just bung another one in there with "join". If I do: s2 = cell2mat(join(s2," ")), % I get the same number of spaces s2 = cell2mat(join(s2," ")) % I get too many spaces! Driving me wild...

on 12 Apr 2019 at 8:02

danteliujie submitted a Comment to Solution 210174

god!

on 12 Apr 2019 at 7:25

Ajay Pattassery submitted a Comment to Problem 68. Kaprekar Steps

There is a small correction needed in the problem statement. Not all natural numbers, but 4 digit numbers can be reduced to Kaprekar number by the mentioned method. Similarly 3 digit numbers can be reduced to 495 https://en.wikipedia.org/wiki/D._R._Kaprekar

on 12 Apr 2019 at 6:36

Jesús Zambrano submitted a Comment to Problem 44848. Approximate the inverse tangent by power series

Test suite has been fixed. Thanks for the comments!!

on 11 Apr 2019 at 19:08

danteliujie submitted a Comment to Problem 3088. Compute LOG(1+X) in natural log

need add abs to the test cases

on 10 Apr 2019 at 16:07

George Iskander submitted a Comment to Solution 1781233

I couldn't remember interp1 but I formed a very silly code to do the same

on 10 Apr 2019 at 15:54

Mehdi BENSEDDIK submitted a Comment to Problem 232. Project Euler: Problem 2, Sum of even Fibonacci

I solved the problem until x = 4000000 but x = 97455000 it gives me an error of exceeding the memory(overflow) because the number is too large.

on 10 Apr 2019 at 13:28

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

Great idea to learn colon notation! Thanks!

on 10 Apr 2019 at 12:41

Chris Coote submitted a Comment to Solution 1780440

Elegant brain teaser and a good reminder to always read the question carefully...

on 10 Apr 2019 at 10:49

Chris Coote submitted a Comment to Problem 13. Remove all the consonants

The vowels to retain here are, 'a e i o u'. There appears to be confusion for some.

on 10 Apr 2019 at 9:27

jiangming wang submitted a Comment to Problem 174. Roll the Dice!

why can't use unidrnd(6)?

on 10 Apr 2019 at 4:45

George Iskander submitted a Comment to Solution 1779863

change the output variable to be z

on 10 Apr 2019 at 0:05

George Iskander submitted a Comment to Solution 1779834

You have mentioned that the input is 4X4 and then you tested on different dimensions. :(

on 9 Apr 2019 at 23:54

danteliujie submitted a Comment to Solution 655485

cool

on 8 Apr 2019 at 15:49

Rayner Saggers submitted a Comment to Problem 44850. X O X O

By 'n' I mean any length of square grid. You solution should still be valid for a 1x1 grid. (I've now added an extra test script for this case). Though in reality I agree such a game wouldnt be much fun! https://www.mathworks.com/matlabcentral/cody/problems/44851 adds the dynamic of stopping play when someone wins, though Ciaran's test suite needs fixing before you can attempt this one

on 8 Apr 2019 at 12:12

danteliujie submitted a Comment to Solution 678164

Like it

on 7 Apr 2019 at 9:06

Mehdi BENSEDDIK submitted a Comment to Solution 1319950

Indeed, My code works until the d = 50 because it's a large number, so our algorithm is correct we should not worry about it, I think we have succeed in this challenge.

on 4 Apr 2019 at 14:41

Sebastian Castro submitted a Comment to Problem 44831. Composing relative poses in 2D: problem 2

Should specify whether the bearing is supposed to be in radians or degrees (FYI, it's radians). Also, in the 3rd paragraph the word "displacement" is in there twice. Minor typo :)

on 3 Apr 2019 at 23:03

Vadim Smirnov submitted a Comment to Problem 44850. X O X O

Rayner, by N do you include odds and even lengths ? what's the minimal length too? Cant imagine a game being fun with just one square )

on 3 Apr 2019 at 13:32

Adem Mekonnen submitted a Comment to Problem 43298. Calculate area of sector

How to preprocessing brain Dicom images like t1,t2 , and flair to remove noise and measure the quality of those images

on 2 Apr 2019 at 8:13

Michael Eldredge submitted a Comment to Problem 1554. Calculate the derivative of a polynomial

There is only one test problem.

on 2 Apr 2019 at 2:29

Michael Eldredge submitted a Comment to Problem 2377. Area of a disk

The numbers are wrong. Please fix the test suite.

on 2 Apr 2019 at 1:59

Michael Eldredge submitted a Comment to Problem 1958. Add a row of zeros on top of a matrix

I literally copied and pasted a part of the test suite into my code to make it work. This is not a good thing.

on 1 Apr 2019 at 23:26

Abhishek Singh submitted a Comment to Problem 33. Create times-tables

Easy one!

on 29 Mar 2019 at 4:25

Vishal submitted a Comment to Solution 1763626

Test suite does not have similar fashion output.

on 27 Mar 2019 at 11:12

Siddhant Shenoy submitted a Comment to Problem 371. Decimal Comparison

Yes, I completely agree with the other comments. The second test case is incorrect. '12.3456' is not equal to 12.3456789 which when rounded off to 4 decimal places becomes 12.3457 The 50 solvers yet (as of 26/03/19) are undeserving of their title as 'Solvers'.

on 26 Mar 2019 at 12:47

Jesús Zambrano submitted a Comment to Solution 1717118

I´m afraid all tests are correct. But thanks anyway!

on 23 Mar 2019

Tran Hiep Dinh submitted a Comment to Problem 44384. Find the nearest prime number

Test case No. 5 x = 911; y_correct = 911; Should the nearest prime number for 911 have been 907?

on 21 Mar 2019

Nuwan Senevirathne submitted a Comment to Problem 167. Pizza!

PIzza

on 20 Mar 2019

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

the regexp solution is great

on 18 Mar 2019

1 – 50 of 9,586