Solved


Finding the next number in a number list, are you able to crack it!
So it goes like this, I give a number list and you find the next value! I found a way to do it, just wondering how many other...

8 days ago

Solved


Return the names and values of the input arguments of a function
Given a function name, return the names and values of the input arguments. e.g. function_name(arg1, arg2) is a function de...

8 days ago

Solved


Obscured by Earth
Given two points in <http://en.wikipedia.org/wiki/Earth-centered_inertial ECI> reference frame, check wheather they are in line-...

8 days ago

Solved


Possible Opponents Matrix for single-elimination tournament
It's tournament time! Given a single-elimination tournament with 2^N competitors, compute the 2^N by 2^N matrix M such that M...

8 days ago

Solved


Remove collinear points in a set of 2D points defining a polygon
Consider a polygon that is obtained by joining a set of 2D points whose coordinates are stored in matrix P=[x,y]. Write a functi...

8 days ago

Solved


Area of polygon
Given the vertices in vectors X,Y, return the area of the polygon they define.

8 days ago

Solved


Caesar Cipher
Given a input word x and a shift n, encrypt the word with caesar cipher of shift n.

8 days ago

Solved


Exhaust all possible logical vectors
Input a length argument and list all possible logical vectors of that length. My solution is of size 29. Can you find an even s...

8 days ago

Solved


Integer vector optimal lossless deduplication
You're given an integer vector A, a Min scalar and a Max scalar. You can assume all elements in A are in [Min,Max] range, and nu...

8 days ago

Solved


Can the knight take out the pawn?
* position of knight = k * position of pawns = p can the knight take out those pawns? * k='Nf4' * p={'g6','g7'} then...

8 days ago

Solved


List Honaker primes
The number 131 is the 32nd prime number. It is a Honaker prime because the sum of its digits (1+3+1) equals the sum of the digit...

8 days ago

Solved


Chicken Race
2 chickens, Pete and Fred, compete in a 100 meter race. Pete runs at a velocity of vp meter/second and Fred is slower, running ...

8 days ago

Solved


Array GCD
* Find Greatest Common Divisor in a given array * Function Template: function ans = arraygcd(a) % a=[45 15 200 ...

8 days ago

Solved


Find Excess 3 code of given decimal number.
Find Excess 3 code of given binary number. <http://en.wikipedia.org/wiki/Excess-3/ Excess-3> In XS-3, numbers are represe...

8 days ago

Solved


Mo money, mo math #2! (★★★)
(adapted from Prob 9 Cody team) You have a matrix for which each row is a person and the columns represent the number of quar...

8 days ago

Solved


Find max prime number
Given integer number n. Find the max prime number (mpn) that smaller than or equal to n. Example: n = 10 --> mpn = 7

8 days ago

Solved


counting for loop
Complete the function below using a for loop to count from 3 to N by 2. For example, if N is 10, count 3, 5, 7, 9 and stop. Fo...

8 days ago

Solved


Yoonir - 01
Find the area of a five-pointed star inscribed in a circle of radius r.

8 days ago

Solved


Carnot cycle
Carnot engine is considered the most efficient heat engine.When operated between two temperatures T1 and T2, the efficiency is g...

8 days ago

Solved


Number of occurrences of letter in a text
Given an input text either as a string or as a cell array of strings, return a (1 x 26) matrix containing the number of occurren...

8 days ago

Solved


Don't Try, give up and return NaN.
This is another version of <http://www.mathworks.com/matlabcentral/cody/problems/3107-try-and-catch-simple-example problem 3107....

8 days ago

Solved


Distance a ball travels after throwing vertically
Calculate the total distance *'d'* (in meters) a ball would travel after *'s'* seconds and starting velocity of *'v'* (in m/s). ...

8 days ago

Solved


Compute hamming distance between two binary vectors represented using lists of 1-byte numbers
Let v and u be vectors of the same size with 8-bit integers (0-255). We want to compute the number of bits where those vectors d...

8 days ago

Solved


Abelian Sandpile - 01
Generate a matrix like abelian sandpile where the center of the matrix is n. For example, n=3 out=[0 0 0 0 ...

8 days ago

Solved


Is 3D point set Co-Planar?
This Challenge is to determine if four 3D integer points are co-planar. Given a 4x3 matrix representing four x,y,z integer poin...

8 days ago

Solved


Pattern find
FInd the pattern x = 3; \y=1558 x = 10; \y= 2657548

8 days ago

Solved


Sort Non-zeros
Consider 0s in a vector creates a break-point. sort all the sub-arrays created by those break points. For example, a = [3, 4, 1...

8 days ago

Solved


Find the list of all open files
In the test suite, I use <http://www.mathworks.com/help/matlab/ref/fopen.html fopen> to create new files. The task is to find th...

8 days ago

Solved


Procrustean bed
Given a vector x and an integer n, convert x to a vector of length n by (1) chopping off the end if it is too long, or (2) addin...

8 days ago

Solved


Is my wife really right?
For every input, output the string 'yes' once. Example: [yes1, yes2] = YesSheIs('Am I right?', 'Do you love me?') yes1 = 'yes'...

8 days ago

Load more