Cody

Recent Activity

1 – 50 of 5,218

Yuhua Di submitted a Comment to Solution 2017112

lol

on 19 Jan 2020 at 5:44

Jordan Covert submitted a Comment to Solution 1123836

I believe size(x,2) is equivalent to length(x). Great solution though! Made me realize where I put in too much work.

on 17 Jan 2020 at 23:42

Bryan Lambo submitted a Comment to Solution 1707694

Wow this is long haha. Congrats!

on 17 Jan 2020 at 8:18

Bryan Lambo submitted a Comment to Solution 1204954

nice! didn't know about discretize til i saw this solution

on 17 Jan 2020 at 6:37

Bryan Lambo submitted a Comment to Solution 1601773

the problem means to exclude all numbers with the digit 'm' so example n=20, m=5, you exclude numbers 5 and 15 as these contains the digit m=5.

on 16 Jan 2020 at 8:42

Paul Johnson submitted a Comment to Solution 2094182

This is a bit of a Mickey Mouse problem!

on 15 Jan 2020 at 21:10

Pooja Lalan submitted a Comment to Solution 2091052

The expected output is a column vector containing ALL the bmi values, whereas your code returns a single bmi value i.e. the last one. Hope that helps!

on 14 Jan 2020 at 15:19

Jonathan submitted a Comment to Solution 2090206

Nice solution. I was waiting for someone to use this particular function. I'm surprised its first use was on the matrix version. It takes a little extra work to use it like this.

on 13 Jan 2020 at 13:51

Aleksandrov Igor submitted a Comment to Solution 1812725

[~,b]= max(sum((a.*[.25,.05,.1,.01]),2))

on 13 Jan 2020 at 13:25

Ewan submitted a Comment to Solution 2091052

I've got the right values but I've failed the assertion somehow?

on 13 Jan 2020 at 10:15

Manvendra Singh Rajawat submitted a Comment to Solution 2089550

solution test 2 has mistake y_correct = [-1 -1 -1 -2 -2 -2 -2 5 5 5 5 5 ; there should be ] at the end

on 12 Jan 2020 at 7:08

Asif Newaz submitted a Comment to Solution 34461

i dont get it..how does it work?

on 12 Jan 2020 at 6:11

Jonathan submitted a Comment to Solution 2089110

I got tired of solving these problems. So, I just wrote a solution that works for everything.

on 11 Jan 2020 at 18:46

Jonathan submitted a Comment to Solution 2088229

I agree, because I like the creativity. Restrictions are the name of the game, though.

on 10 Jan 2020 at 18:04

Jonathan submitted a Comment to Solution 2088294

Nice use of MATLAB functionality.

on 10 Jan 2020 at 18:01

Jonathan Agg submitted a Comment to Solution 2088229

It's a shame the check on files and figures prevents this one from working!

on 10 Jan 2020 at 16:59

Jonathan submitted a Comment to Solution 2088105

The first test case is incorrect. The null path (starting and ending at the same place) is a solution. The 1x1 case should have 1 solution.

on 10 Jan 2020 at 15:02

Jonathan Agg submitted a Comment to Solution 2088115

Sorry, I shouldn't have made this trivial change - I don't like not writing to a variable!

on 10 Jan 2020 at 15:00

Jonathan submitted a Comment to Solution 2083150

I like this solution. It shows the basic MATLAB creativity I was looking for!

on 10 Jan 2020 at 14:24

Asif Newaz submitted a Comment to Solution 2041010

thank u

on 9 Jan 2020 at 6:44

Nico Noordam submitted a Comment to Solution 210174

This solution fails on input = [ 8 2 4 9 5 3 6 7 1 6 3 5 8 1 9 7 2 4 7 1 9 6 2 4 8 5 3 5 8 7 2 9 1 3 4 6 1 4 2 7 3 6 5 8 9 3 9 6 4 8 5 2 1 7 2 6 1 5 4 7 9 3 8 4 7 8 3 6 2 1 9 5 9 5 3 1 7 8 4 6 2 ] which is the first assertion test with the 9 and 7 on row 2 and 7 exchanged

on 8 Jan 2020 at 8:38

Petr submitted a Comment to Solution 2082546

Test 3 and 5 - invalid square brackets Test 4 - array is too big, L = 1000; W = 119; would work the same way

on 7 Jan 2020 at 12:20

Chul Min Yeum submitted a Comment to Solution 785960

It's a very good idea!

on 4 Jan 2020 at 22:22

Nico Noordam submitted a Comment to Solution 1094380

length not correct, use size(A,2)

on 3 Jan 2020 at 10:19

Nico Noordam submitted a Comment to Solution 1956898

not a general solution, will fail A=[1;2]. Use size iso lengt

on 3 Jan 2020 at 10:18

Sarthak Saumya submitted a Comment to Solution 2075885

very easy...

on 3 Jan 2020 at 7:14

Chul Min Yeum submitted a Comment to Solution 2077121

It's quite challenging!

on 2 Jan 2020 at 19:08

Piyush Pulukool submitted a Comment to Solution 1812771

true ;( and now this happened

on 2 Jan 2020 at 16:14

Carlo Venettacci submitted a Comment to Solution 2075885

Too easy...

on 1 Jan 2020 at 13:57

Raymond MacNeil submitted a Comment to Solution 1405581

Because if you do not double up (''), the single apostrophe is read by MATLAB as the end of the character vector. This is how you get around this.

on 31 Dec 2019 at 11:26

Raymond MacNeil submitted a Comment to Solution 2075072

A lot easier than I originally anticipated. Once you start setting up the problem variables, it comes together pretty easily.

on 31 Dec 2019 at 9:46

Paresh yeole submitted a Comment to Solution 2071007

Why the first test case fails? It passes in the matlab.

on 27 Dec 2019 at 21:56

Yoshimasa Nakatani submitted a Comment to Solution 2070711

Thank you

on 27 Dec 2019 at 14:58

David Hill submitted a Comment to Solution 2069153

Can Cody not handle nested functions?

on 25 Dec 2019 at 23:56

David Hill submitted a Comment to Solution 2069099

Not sure why this solution is not working. It runs and works when I run it on my matlab.

on 25 Dec 2019 at 21:39

Nico Noordam submitted a Comment to Solution 2052986

Yes. Also this solutions will fail fib(0)

on 23 Dec 2019

Shlomo Geva submitted a Comment to Solution 2064693

This solution actually fails on the assertion when using the following test (my own). It happens because of computational precision produced from using linspace() // out by about 0.222 * 1.0e-15. s = { ... 'Day Temp' ' 1 1.3' ' 5 9999' ' 6 9999' ' 5 9999' ' 6 9999' ' 2 1.12' ' 3 17' ' 4 16' ' 5 9999' ' 6 9999' ' 7 19'}; t_correct = [1.3 1.264 1.228 1.1920 1.156 1.12 17 16 17 18 19]; assert(isequal(read_and_interp(s),t_correct));

on 20 Dec 2019

Pooja Lalan submitted a Comment to Solution 2059232

Thanks Paresh. Your approach is a valid solution that the tests were not designed to evaluate previously. I have now modified the tests to pass this alternative approach. However, there are two other issues with this solution, which you will have to resolve: 1. The color 'b' expected for the line is not the same as the default blue color the MATLAB uses. 2. The output is expected to be the minimum value of y, not a handle to the plot. I have also added appropriate messages for the tests. Thanks again!

on 19 Dec 2019

Jason Stiefvater submitted a Comment to Solution 2062616

kinda cheated but test values were stupid

on 18 Dec 2019

Nico Noordam submitted a Comment to Solution 1917805

return only the names of those hotels with a rating of cutoff value or above in an output variable good. So this solution will fail if rating is equal to cutoff. This is not tested in the asserts!

on 18 Dec 2019

David Motson submitted a Comment to Solution 2062135

The test suite doesn't match the problem description - how can the answer to test two be 5?

on 18 Dec 2019

Asif Newaz submitted a Comment to Solution 2061958

i am surprised to see why the same thing doesn't work when kept in decimal

on 18 Dec 2019

Paresh yeole submitted a Comment to Solution 2059232

It works perfectly fine on PC.

on 16 Dec 2019

Manvendra Singh Rajawat submitted a Comment to Solution 2058836

is the problem is correct? do we take output y or z?

on 16 Dec 2019

Qiaowen submitted a Comment to Solution 2058634

i don't know why it does not work

on 16 Dec 2019

Qiaowen submitted a Comment to Solution 2058634

PB =[range*cosd(bearing);range*sind(bearing);1] ; P=T*PB; P=P(1:2,:);

on 16 Dec 2019

Asif Newaz submitted a Comment to Solution 1427667

@Simone Sabbatini i dont think ur algorithm is correct. understand the sequence well.. The first term is zero. Then- If the last term is *new* to the sequence so far then-- The next term is zero. Otherwise: The next term is "how far back" this last term occured previousely.

on 15 Dec 2019

Asif Newaz submitted a Comment to Solution 2056983

why it is showing--"While evaluating the solution, the server encountered an error caused by temporary unavailability of MATLAB Service'' ...

on 13 Dec 2019

Iskender Gencer submitted a Comment to Solution 2056732

The pass criteria should not be specific to the number of spaces that are left instead of the omitted state names. This beats the purpose of the exercise. There should either be no extra spaces left in the solutions, or it should not be specific to how the author of the challenge solved the problem.

on 13 Dec 2019

KULWINDER KAUR submitted a Comment to Solution 2056230

Nice problem

on 12 Dec 2019

1 – 50 of 5,218