71 total contributions since 2012

Solved

Find the peak 3n+1 sequence value

A Collatz sequence is the sequence where, for a given number n, the next number in the sequence is either n/2 if the number is e...

7 years ago

Solved

Back and Forth Rows

Given a number n, create an n-by-n matrix in which the integers from 1 to n^2 wind back and forth along the rows as shown in the...

7 years ago

Solved

Create incrementing array

Given a and b generate an output matrix as shown in following examples: a=2 b=5 output=[2 20 200 2000 20000] a=4 b...

7 years ago

Solved

Find same numbers touching each other...

So the goal here is to find any number that is equal to its immediate neighbors and mark it true. Here is some examples: x...

7 years ago

Solved

Distance walked 1D

Suppose you go from position 7 to 10 to 6 to 4. Then you have walked 9 units of distance, since 7 to 10 is 3 units, 10 to 6 is 4...

7 years ago

Solved

Letter and word frequency

Here is a task: You’re given a text file. Your first task is to create a variable in MATLAB which will hold the text given to...

7 years ago

Solved

Find best domino orientation

Given a list of pairs, find the orientation they should be placed in a line, such that the sum of the absolute values of the dif...

7 years ago

Solved

Stuff the Board

You have a stack of tiles to put onto an array-like playing board. Each tile has a number (always an integer), and the board var...

7 years ago

Solved

Singularity

Singularity is very important thing of robust control. Try to plot singular values over frequency of a MIMO system.

7 years ago

Solved

Fix the last element of a cell array

Note: this is lifted directly from <http://www.mathworks.com/matlabcentral/answers/82825-puzzler-for-a-monday Puzzler for a Mond...

7 years ago

Solved

Find state names that start with the letter N

Given a list of US states, remove all the states that start with the letter N. If s1 = 'Alabama Montana Nebraska Vermont Ne...

7 years ago

Solved

Reverse the vector

Reverse the vector elements. Example: Input x = [1,2,3,4,5,6,7,8,9] Output y = [9,8,7,6,5,4,3,2,1]

7 years ago

Solved

How to find the position of an element in a vector without using the find function

Write a function posX=findPosition(x,y) where x is a vector and y is the number that you are searching for. Examples: fin...

7 years ago

Problem

Calculate FFT

Calculate the fft manually, without using matlab's builtin function. No cheating allowed.

7 years ago | 2 | 16 solvers

Solved

Sum all integers from 1 to 2^n

Given the number x, y must be the summation of all integers from 1 to 2^x. For instance if x=2 then y must be 1+2+3+4=10.

7 years ago

Solved

Factorial !

Calculate the factorial of a non-negative integer without using the built in function *factorial*

7 years ago

Problem

Get me! v4 (Cody hacking challenge)

The latest version of the anti-hack test-suite.

7 years ago | 1 | 17 solvers

Submitted

Windows screenshots

Allows listing MS Windows' windows, setting their size, giving focus, and take screenshots.

7 years ago | 1 download |

Solved

hackathon impossible

You might have found a solution to our <http://www.mathworks.com/matlabcentral/cody/problems/205-hackathon-the-beginnings previo...

7 years ago

Solved

Get me! v3

A harder version of Get me! I *think* I only left one door open.. we could be close to a perfect anti-cheating engine,

7 years ago

Solved

The Hitchhiker's Guide to MATLAB

Output logical "true" if the input is the answer to life, the universe and everything. Otherwise, output logical "false".

7 years ago

Solved

Sort a list of complex numbers based on far they are from the origin.

Given a list of complex numbers z, return a list zSorted such that the numbers that are farthest from the origin (0+0i) appear f...

7 years ago

Solved

Find the numeric mean of the prime numbers in a matrix.

There will always be at least one prime in the matrix. Example: Input in = [ 8 3 5 9 ] Output out is 4...

7 years ago

Solved

Ripping numbers apart!

So you have to "rip" a number apart into individual digits... The end output is a cell. That is if: x = 12345678 o...

7 years ago

Solved

Can you beat the lottery again (for hardcore coder) ?

Inspired by the Problem 1713 by Chris E. Here is the code that generates the first lottery number: rng('shuffle'); numb...

7 years ago

Solved

Weighted average

Given two lists of numbers, determine the weighted average. Example [1 2 3] and [10 15 20] should result in 33.333...

7 years ago

Solved

Remove any row in which a NaN appears

Given the matrix A, return B in which all the rows that have one or more <http://www.mathworks.com/help/techdoc/ref/nan.html NaN...

7 years ago

Solved

Finding Perfect Squares

Given a vector of numbers, return true if one of the numbers is a square of one of the other numbers. Otherwise return false. E...

7 years ago

Solved

Create times-tables

At one time or another, we all had to memorize boring times tables. 5 times 5 is 25. 5 times 6 is 30. 12 times 12 is way more th...

7 years ago