Solved


nth Rational Number
Return the nth rational number. This is the inverse to Problem <http://www.mathworks.com/matlabcentral/cody/problems/1471 1...

9 years ago

Solved


Polite numbers. Politeness.
A polite number is an integer that sums of two or more consecutive positive integers. Politeness of a positive integer is a num...

9 years ago

Solved


Polite numbers. N-th polite number.
A polite number is an integer that sums of at least two consecutive positive integers. For example _7 = 3+4_ so 7 is a polite...

9 years ago

Solved


Is this number Munchhausen Narcissistic?
In this problem, simply return 1 if a supplied number is Munchhausen narcissistic or 0 if not. Example 153 is narcissistic...

9 years ago

Solved


Smith numbers
Return true if the input is a Smith number in base ten. Otherwise, return false. Read about Smith numbers at <http://en.wikipedi...

9 years ago

Solved


Evil Number
Check if a given natural number is evil or not. Read more at <https://oeis.org/A001969 OEIS>.

9 years ago

Solved


Compute Fibonacci Number
Compute the _n_-th Fibonacci Number f(0) = 0, f(1) = 1, f(2) = 1, f(3) = 2, ... f(42) = 267914296

9 years ago

Solved


Find vampire numbers
A <http://en.wikipedia.org/wiki/Vampire_number vampire number> is a number v that is the product of two numbers x and y such th...

9 years ago

Solved


Kaprekar numbers
Test if the input is a Kaprekar number: <http://mathworld.wolfram.com/KaprekarNumber.html>. Return a logical true or false. ...

9 years ago

Solved


Determine if a Given Number is a Triangle Number
*Description:* Determine if the elements of an input array are triangle numbers and return the result as an array with the sa...

9 years ago

Solved


Choose the best fitting dominoes
You will be given a cell array of nx2 matrices. Choose one row from each matrix. These are the ordered pairs that will be plac...

9 years ago

Solved


Scoring for oriented dominoes
Given a list of ordered pairs, and the order they should be placed in a line, find the sum of the absolute values of the differe...

9 years ago

Solved


Rotate and display numbered tile
Imagine a square tile with four numbers on it, one on each edge. We will call these edges north, east, south, and west. If th...

9 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...

9 years ago

Solved


Test for balanced parentheses
Given the input inStr, give the boolean output out indicating whether all the parentheses are balanced. Examples: * If ...

9 years ago

Solved


Trimming Spaces
Given a string, remove all leading and trailing spaces (where space is defined as ASCII 32). Input a = ' singular value deco...

9 years ago

Solved


Which doors are open?
There are n doors in an alley. Initially they are all shut. You have been tasked to go down the alley n times, and open/shut the...

9 years ago

Solved


Pangrams!
A pangram, or holoalphabetic sentence, is a sentence using every letter of the alphabet at least once. Example: Input s ...

9 years ago

Solved


Replace NaNs with the number that appears to its left in the row.
Replace NaNs with the number that appears to its left in the row. If there are more than one consecutive NaNs, they should all ...

9 years ago

Solved


Binary numbers
Given a positive, scalar integer n, create a (2^n)-by-n double-precision matrix containing the binary numbers from 0 through 2^n...

9 years ago

Solved


Remove all the consonants
Remove all the consonants in the given phrase. Example: Input s1 = 'Jack and Jill went up the hill'; Output s2 is 'a ...

9 years ago

Solved


Remove all the words that end with "ain"
Given the string s1, return the string s2 with the target characters removed. For example, given s1 = 'the main event' your ...

9 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...

9 years ago

Solved


Find the 9's Complement
Find the 9's complement of the given number. An example of how this works is <http://electrical4u.com/9s-complement-and-10s-c...

9 years ago

Solved


How many hours are there in a day in Italy?
Remember "European Summer Time"

9 years ago

Solved


Sample from random roulette
Given a list of values and their probabilities sample 10.000 values. Example: x = [1 2 3 4 5]; prob = [0.2 0.1 0.4 0....

9 years ago

Solved


How find transpose of a matrix?
How find transpose of a matrix?

9 years ago

Solved


center of mass
R is a given matrix with size [n,2]. R(i,:) is interpreted as the 2D-position of a mass point with mass i. Calculate the center ...

9 years ago

Solved


pizza deals
Given two pizza slices of different sizes: * Slice A with angle alpha1, radius r1 and price p1 * Slice B with angle alpha2, ...

9 years ago

Solved


Is My Wife Wrong?
Answer the question. (see also <http://www.mathworks.com/matlabcentral/cody/problems/149-is-my-wife-right Problem 149: Is my ...

9 years ago

Load more