Cody

Recent Activity

51 – 100 of 9,638

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 at 16:53

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

Good problem!

on 26 Apr 2019 at 15:36

Paul Smits submitted a Comment to Solution 1797786

Too many loops and a long solution. But my brain broke down when trying to do it in 4- or 5-dimensional arrays :')

on 26 Apr 2019 at 12:36

goc3 submitted a Comment to Solution 1684038

That's quite the pattern to figure out...

on 25 Apr 2019 at 19:21

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

Easy to do, what's your reasoning?

on 23 Apr 2019

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.

on 23 Apr 2019

danteliujie submitted a Comment to Solution 341253

cool solution

on 23 Apr 2019

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

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

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

on 22 Apr 2019

goc3 submitted a Comment to Solution 1790572

Cody utilizes vanilla MATLAB (no toolboxes).

on 22 Apr 2019

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

so interesting!

on 20 Apr 2019

Yuliano Moscoso Yarin submitted a Comment to Solution 1790644

cool!

on 16 Apr 2019

Paul Smits submitted a Comment to Solution 1790572

no function squareform either... pffff

on 16 Apr 2019

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

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

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

danteliujie submitted a Comment to Solution 181619

perfect

on 14 Apr 2019

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

Paul Smits submitted a Comment to Solution 1786296

with functions like nchoosek and primes, it is quite easy

on 13 Apr 2019

Paul Smits submitted a Comment to Solution 1786021

Cheating with empty index output

on 13 Apr 2019

danteliujie submitted a Comment to Solution 226248

cool

on 12 Apr 2019

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

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

danteliujie submitted a Comment to Solution 210174

god!

on 12 Apr 2019

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

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

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

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

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

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

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

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

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

why can't use unidrnd(6)?

on 10 Apr 2019

George Iskander submitted a Comment to Solution 1779863

change the output variable to be z

on 10 Apr 2019

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

danteliujie submitted a Comment to Solution 655485

cool

on 8 Apr 2019

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

danteliujie submitted a Comment to Solution 678164

Like it

on 7 Apr 2019

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

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

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

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

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

There is only one test problem.

on 2 Apr 2019

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

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

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

Easy one!

on 29 Mar 2019

Vishal submitted a Comment to Solution 1763626

Test suite does not have similar fashion output.

on 27 Mar 2019

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

51 – 100 of 9,638