Cody

Recent Activity

1 – 50 of 11,907

kaatil_coder submitted a Comment to Problem 733. Extract Built In Functions and Toolbox Functions from String or Function Handle

In what order the names of the function are sorted? (Thanks for the useful tags.)

2 hours and 1 minute ago

Rafael S.T. Vieira submitted a Comment to Problem 44208. Where's Waldo?

I recommend adding to the description that Waldo must have all its letters following the same orientation (horizontal, vertical or diagonal) because there are other ways to find waldo when orientation is not an issue.

5 hours and 24 minutes ago

Rafael S.T. Vieira submitted a Comment to Problem 43983. Find the quantization index of an analog value using a 6-bit quantizer.

This problem needs more test cases. Some random values selected from a list would help.

9 hours and 30 minutes ago

Rafael S.T. Vieira submitted a Comment to Problem 44910. Find the centre of an arc and its radius

This problem does not have an unique solution. Unless the angle between two points on an arc is 180 degrees, there is always two possible positions for the center. The problem should specifiy which is the right one, or accept both answers. I solved it using the center with the smallest distance to the origin.

9 hours and 44 minutes ago

Rafael S.T. Vieira submitted a Comment to Problem 898. AVIRIS Hyperspectral Bit Mask

The link is not working, could you, please, fix it?

17 hours and 13 minutes ago

Ramesh Singh submitted a Comment to Solution 1640043

only out_str=strjoin(in_cell,delim); work properly

18 hours and 44 minutes ago

kaatil_coder submitted a Comment to Solution 3446468

:|

22 hours and 27 minutes ago

Rafael S.T. Vieira submitted a Comment to Problem 2029. Convert vector datasets to plot with imagesc instead of scatter

Thanks, goc3. Now the problem is working again. :)

on 30 Oct 2020 at 2:47

Rafael S.T. Vieira submitted a Comment to Problem 3081. Scrabble Scores - 4

I've just solved the problem. It seems to be working fine.

on 30 Oct 2020 at 2:05

JM Lippmann submitted a Comment to Problem 2300. Natural numbers in string form

Seems that assert will accept string array instead of cell array. Shouldn't they be treated differently?

on 30 Oct 2020 at 1:38

Rafael S.T. Vieira submitted a Comment to Problem 47123. Determine the Base of the Equation Provided

Similar problem: https://www.mathworks.com/matlabcentral/cody/problems/2643

on 30 Oct 2020 at 0:32

Rafael S.T. Vieira submitted a Comment to Problem 42327. Convert Decimal Number to Hex number (including non integer value)

Already did, goc3, thanks. Please, delete my leading solution if possible.

on 29 Oct 2020 at 23:55

maheshpmk submitted a Comment to Solution 3471458

yes

on 29 Oct 2020 at 17:04

maheshpmk submitted a Comment to Problem 167. Pizza!

good!

on 29 Oct 2020 at 16:39

Rafael S.T. Vieira submitted a Comment to Problem 44100. Input & Output "Smart One"

Tip: primes.

on 29 Oct 2020 at 10:16

Satyanu Bhadra submitted a Comment to Solution 1640058

this isn't a calculation!

on 29 Oct 2020 at 7:26

Rafael S.T. Vieira submitted a Comment to Problem 47103. Estimate Pi by Monte Carlo method

Tip: Generate the pair of numbers using p = rand(2,n)' (the order that numbers must be used: rand(n,2) does not work for instance); this will not solve the problem, but it's half way there.

on 29 Oct 2020 at 0:15

Rafael S.T. Vieira submitted a Comment to Problem 47068. Set zero

The problem description should be set all numbers that are not on a border to zero.

on 28 Oct 2020 at 22:08

kaatil_coder submitted a Comment to Solution 3376128

check the binomial expansion with negative exponent, to learn.

on 28 Oct 2020 at 21:57

kaatil_coder submitted a Comment to Problem 2381. Sum of digit range

@Gareth @Dyuman If number of digits in A, n1 = 4, then A belongs to {10^4 to 10^5-1} You will be given n1 and n2. You need to find the sum of ( min and max number of digits ) in A*B.

on 28 Oct 2020 at 21:22

Rafael S.T. Vieira submitted a Comment to Problem 44239. Mastermind IV: Optimal Solver - max of 5 guesses

Please do not insert a timer on your test suite. Cody already has one, so why not use it? I was under the impression that my implementation of Knuth's algorithm was wrong, when in fact it was only slow. Or if you do insert a timer, please, provide a better feedback. For instance: "your solution cracked all codes under 5 steps, but it will fail to solve them all on time".

on 28 Oct 2020 at 18:22

Anton Casas submitted a Comment to Problem 2423. Integer Sequence - II : New Fibonacci

Probably the most satisfactory problem I've encountered this far. Wonderful!

on 28 Oct 2020 at 16:40

Srimonti Dutta submitted a Comment to Solution 1936817

Just follow the Pythagoras theorem.

on 28 Oct 2020 at 15:12

goc3 submitted a Comment to Problem 2230. Back to basics - array operations

@Nikolaos Nikolaou: while input variables are the same in test cases 7 and 8, they are passed to the function in different orders.

on 28 Oct 2020 at 14:53

goc3 submitted a Comment to Problem 47103. Estimate Pi by Monte Carlo method

The test suite has been updated to check against a tolerance; hopefully that will overcome the concern mentioned by Undine Falkenhagen.

on 28 Oct 2020 at 14:39

Nicolas Schoonbroodt submitted a Comment to Solution 3451468

Not the cleanest code (I would have used dtmc if the corresponding toolbox was available, and I should definitively improve the code quality itself and vectorize it a little bit) The problem was fun, thanks :-)

on 28 Oct 2020 at 13:32

Nikolaos Nikolaou submitted a Comment to Problem 185. Data decompression

i donnot understand the uint8 twist :/

on 28 Oct 2020 at 13:00

Nikolaos Nikolaou submitted a Comment to Problem 2230. Back to basics - array operations

test case 7 and 8 are identical with different result plz fix

on 28 Oct 2020 at 9:52

Undine Falkenhagen submitted a Comment to Problem 47103. Estimate Pi by Monte Carlo method

My solution, although giving the correct answers (checked via "format longg" and accepted by the later tests), did not get accepted in the first test. Maybe there is a problem there?

on 28 Oct 2020 at 8:09

Dyuman Joshi submitted a Comment to Problem 2381. Sum of digit range

Can anyone help me in understanding the problem statement? It's so confusing.

on 28 Oct 2020 at 7:33

Jiseon Shin submitted a Comment to Problem 44311. Number of Even Elements in Fibonacci Sequence

My solution is working in my local computer but is not consistent with Test Suites starting from d = 100. I don't still get the answer.

on 28 Oct 2020 at 6:56

Rafael S.T. Vieira submitted a Comment to Problem 1701. Solve the picross! (Hard)

To any new challengers, know that only logic will not solve these puzzles. You will need some guessing, which means make the computer solve it as far as it can and then you, yes YOU, look at the picture (we humans can recognize the shape and finish the puzzle; the computer not so much). And, please, fell free to try some solvers out there.

on 28 Oct 2020 at 3:16

Rafael S.T. Vieira submitted a Comment to Problem 1701. Solve the picross! (Hard)

Solving a grid of 75x60 squares within Cody's time limit is extra hard. The greatest challenge is to find a fast code; recursion with backtracking no longer seems like a viable option. And I do hope the author is aware that nonograms are an NP-hard problem, which means there is no known fast algorithm to solve the general case: we have to build one for the specific cases of the test suite.

on 27 Oct 2020 at 20:50

goc3 submitted a Comment to Problem 46873. Sum of terms in a series 2 (★★★)

The test suite is updated to use a tolerance check.

on 27 Oct 2020 at 17:41

goc3 submitted a Comment to Problem 980. Unique values without using UNIQUE function

The link has been updated.

on 27 Oct 2020 at 17:38

goc3 submitted a Comment to Problem 2029. Convert vector datasets to plot with imagesc instead of scatter

The test suite has been fixed as requested by Rafael S.T. Vieira.

on 27 Oct 2020 at 17:25

goc3 submitted a Comment to Problem 1591. Find the minimum element of the matrix

The last test case has been fixed.

on 27 Oct 2020 at 15:40

XC_Wang submitted a Comment to Solution 3435463

vpa function ?

on 27 Oct 2020 at 11:50

Lkhagvasuren Byambadorj submitted a Comment to Problem 2022. Find a Pythagorean triple

Thanks, enjoyed these.

on 27 Oct 2020 at 7:12

Rafael S.T. Vieira submitted a Comment to Problem 1700. Solve the picross! (Easy)

Nope, it's not easy. A grid of 20x20 squares is already considered hard by regular players because we have to keep in mind several possible intersections between possible solutions.

on 27 Oct 2020 at 4:24

Rafael S.T. Vieira submitted a Comment to Problem 46943. Cipher the number

I am not sure this method can be called a cipher since there is probably no way to recover the original number. You should probably call it a hash.

on 26 Oct 2020 at 22:54

Nikolaos Nikolaou submitted a Comment to Solution 553551

i thought it should be on the base of the number not 10 :/ am dumb

on 26 Oct 2020 at 19:02

goc3 submitted a Comment to Problem 601. Retirement savings

Variables for the first test were implicitly defined with global scope (lacked initial %%). They should now be constrained to just the first test case.

on 26 Oct 2020 at 17:54

goc3 submitted a Comment to Problem 44731. Find the Pattern

The function name has been changed to not conflict with a built-in function.

on 26 Oct 2020 at 17:31

goc3 submitted a Comment to Problem 67. Find common elements in matrix rows

Test cases with an empty result now test against isempty().

on 26 Oct 2020 at 17:11

goc3 submitted a Comment to Problem 850. Spectral Distance - Speed Scoring

The line referenced by Rafael S.T. Vieira (and prior comments) has been corrected.

on 26 Oct 2020 at 16:34

Lesandu Wenitha Sugathadasa submitted a Comment to Solution 3395103

Nice problem! Read the description carefully! The Oder of Coins is matter

on 26 Oct 2020 at 14:35

cokakola submitted a Comment to Problem 45396. Design a tubesheet for shell-and-tube heat exchangers

breaking the symmetry, one can place more holes in the circle!

on 26 Oct 2020 at 8:56

Tikay submitted a Comment to Problem 258. linear least squares fitting

Sorry, but I can not understand the problem to solve. Can anyone explain to me, please?

on 26 Oct 2020 at 6:28

Rafael S.T. Vieira submitted a Comment to Problem 44971. Convert base 10 to base x (2-16)

Oh, the problem was with my algorithm, sorry. I am indeed using python's long int (for multiplication of large integers), but I was relying on str2num for some operations (which apparently introduced floats back in my code). After removing it, it worked out fine. PS: This new update knocked out some wrong solutions (including some of mine). Awesome. :)

on 26 Oct 2020 at 5:55

1 – 50 of 11,907