Cody

Recent Activity

51 – 100 of 10,086

Gustavo Morales submitted a Comment to Solution 1652052

And................ obviosly "Undefined function or variable 'C1'." You have made assignments in wrong order. Your code says: A(:,1)=C1 Should say: C1 = A(:,1);

on 15 Nov 2019 at 19:07

Gustavo Morales submitted a Comment to Solution 1652052

Could fail the last test, if A has only 1 column: c = 1 Bad indexing (r,c-1) == (r,0) You got to catch case c = 1 and don't swap at all

on 15 Nov 2019 at 19:05

Ali submitted a Comment to Problem 23. Finding Perfect Squares

Clever problem

on 15 Nov 2019 at 18:03

Gustavo Morales submitted a Comment to Solution 1204954

Should be the best for now!

on 15 Nov 2019 at 16:04

Miles Walker submitted a Comment to Problem 78. Implement a ROT13 cipher

Why does the "t" not change in the second word of the second test? The correct answer has an unchanged "t"?

on 15 Nov 2019 at 11:37

Payam Morsali submitted a Comment to Problem 895. Generate N equally spaced intervals between -L and L

y = linspace(-L,L,(N+1)) why this is not working even though it meets all the requirements in the assert?

on 14 Nov 2019 at 20:54

Miles Walker submitted a Comment to Solution 2021683

Cheated with 1...: 1000 - 0001 = 999. 999 - 999 = 0 y = inf; No?

on 14 Nov 2019 at 19:31

Miles Walker submitted a Comment to Solution 2021587

I've never cared so much about America

on 14 Nov 2019 at 18:32

Chris Armstrong submitted a Comment to Solution 942496

I don't think that simply using tf=rem(n,2) should be allowed, its implicit casting which isn't a good thing to depend on.

on 14 Nov 2019 at 8:31

hashim khan submitted a Comment to Problem 3. Find the sum of all the numbers of the input vector

y=sum(x) is not working

on 14 Nov 2019 at 8:01

Asif Newaz submitted a Comment to Problem 1567. Make a vector of prime numbers

ur last test suite..4896 is too big

on 13 Nov 2019 at 21:42

Gustavo Morales submitted a Comment to Solution 1360252

I think is the best solution!

on 13 Nov 2019 at 19:29

Gustavo Morales submitted a Comment to Solution 1337594

this solution just pass the test suite, but if there would be uppercase consonants, will fail! The variable letter must contain the uppercase consonants too!

on 13 Nov 2019 at 19:17

Asif Newaz submitted a Comment to Problem 114. Check to see if a Sudoku Puzzle is Solved

ur test suite 6 is wrong, isn't it??

on 13 Nov 2019 at 17:44

Miles Walker submitted a Comment to Solution 2017318

Pretty kooky final test...

on 13 Nov 2019 at 8:49

Kiam Heong Kwa submitted a Comment to Solution 2017112

The following solution, which is correct, is marked wrong. function a = checkerboard(n) a = ones(n); a(2:2:end) = 0; end

on 13 Nov 2019 at 5:04

David Motson submitted a Comment to Solution 2015845

I discovered using a for loop doesn't work - too slow. Then I realised that randi can generate the required vector, doh!

on 12 Nov 2019 at 13:46

David Motson submitted a Comment to Problem 44951. Verify Law of Large Numbers

The solution quits because it's taking too long. 1e8 is too many?

on 12 Nov 2019 at 13:32

Kingfall submitted a Comment to Problem 44960. Rescale Scores

It appears the last column of the output from the problem statement should be 3.5; 0.0; 2.0 instead of 3.5; 0.0; 3.0, but the first test suite does have it correct.

on 11 Nov 2019 at 15:47

Pooja Lalan submitted a Comment to Problem 44958. Crop an Image

Thank you Payam. I assume you meant specifying the order of the inputs explicitly. I have updated the description to make it clearer.

on 11 Nov 2019 at 15:20

Jason Walker submitted a Comment to Solution 1980061

nice!

on 11 Nov 2019 at 13:31

P Santosh Kumar Patra submitted a Comment to Solution 2012623

Easy way to learn concatenation :)

on 10 Nov 2019 at 17:52

Richard Dezso Kovacs submitted a Comment to Problem 44949. Find the Best Hotels

You should mention that the answer should be given as a column vector, rather than row vector. One at this time must examine the assessment code to give the right answer, while I think it should be self-contained in the question itself.

on 10 Nov 2019 at 10:25

Fakhteh Ghalami submitted a Comment to Problem 568. Number of 1s in a binary string

would you please let me know why sum(x) creates error?

on 9 Nov 2019 at 20:10

Fakhteh Ghalami submitted a Comment to Problem 174. Roll the Dice!

can anyone help me why x1 = 1 + (5)*rand(1,1); x2 = 1 + (5)*rand(1,1); is wrong???

on 9 Nov 2019 at 20:08

Payam Morsali submitted a Comment to Problem 44958. Crop an Image

you should mention which is which in this matrix Icrop = crop_image(I, 2, 2, 1, 3)

on 9 Nov 2019 at 10:08

Fakhteh Ghalami submitted a Comment to Problem 8. Add two numbers

c=a+b

on 8 Nov 2019 at 16:25

Dan Xu submitted a Comment to Problem 1. Times 2 - START HERE

Great for test, like Hello world.

on 8 Nov 2019 at 16:12

William submitted a Comment to Problem 44909. Reepeating numbers in array

Problem #2 has a missing right bracket on y_correct.

on 6 Nov 2019 at 13:47

David Motson submitted a Comment to Problem 45173. Create the flag of Ramumbia

Please correct the test suite. I believe that I have submitted a correct solution

on 5 Nov 2019

David Motson submitted a Comment to Problem 45160. Convert characters into numbers

presumably this problem is incomplete? the test doesn't check anything meaningful

on 5 Nov 2019

Bob Lin submitted a Comment to Solution 2003102

Watch out! Martix size!

on 5 Nov 2019

David Motson submitted a Comment to Solution 1936837

Surely these ! echo "function assert(~) " >./assert.m solutions are not valid?

on 4 Nov 2019

David Motson submitted a Comment to Problem 174. Roll the Dice!

I offered a solution that should be working (works okay in Matlab) but not here: round(rand()*5+1); - not the most optimum, but still provides the correct output, yet fails the test

on 4 Nov 2019

Payam Morsali submitted a Comment to Solution 2001066

why this isn't working here? it works on my laptop; function ind = subset_sum(v,n) k=dec2bin(0:2^length(v)-1); b=k.*v; l=find(sum(b')==n); m=k(l,:).*(1:length(v)); ind=m(m>0); end

on 3 Nov 2019

Asif Newaz submitted a Comment to Problem 64. The Goldbach Conjecture, Part 2

@Dima Panna 'nthprime' uses symbolic math toolbox which is not supported in cody

on 1 Nov 2019

Simon submitted a Comment to Problem 1035. Generate a vector like 1,2,2,3,3,3,4,4,4,4

Can it be done without a for loop?

on 1 Nov 2019

Asif Newaz submitted a Comment to Problem 1080. Guess Cipher

i dont get it.help me understand

on 30 Oct 2019

Daniel Montag submitted a Comment to Problem 953. Pi Estimate 1

The link is broken, but you can solve this problem with the Leibniz formula for π.

on 30 Oct 2019

Xiangyu Liu submitted a Comment to Solution 1812725

Thanks

on 29 Oct 2019

Asif Newaz submitted a Comment to Problem 31. Remove all the words that end with "ain"

nice problem..really nic

on 28 Oct 2019

David Hill submitted a Comment to Solution 1993615

Very nice solution.

on 28 Oct 2019

Nikolaos Nikolaou submitted a Comment to Problem 43667. Use a timetable to analyze a train timetable (Part 4)

Peng do share the grouping method cause it eludes me :)

on 28 Oct 2019

Benjamin Richards submitted a Comment to Problem 2423. Integer Sequence - II : New Fibonacci

The Integer Sequence isn't shown for some reason.

on 28 Oct 2019

Nikolaos Nikolaou submitted a Comment to Problem 397. capable husband?

struggled with this one :) Hint :monte carlo algorthim approach

on 27 Oct 2019

51 – 100 of 10,086