Solved


How many Fibonacci numbers?
Find the number of unique Fibonacci numbers (don't count repeats) in a vector of positive integers. Example: x = [1 2 3 4...

2 months ago

Solved


Number of Even Elements in Fibonacci Sequence
Find how many even Fibonacci numbers are available in the first d numbers. Consider the following first 14 numbers 1 1 2...

2 months ago

Solved


Temperature Conversion Utility (Strings)
This is a follow-on problem to <http://www.mathworks.com/matlabcentral/cody/problems/2413-temperature-conversion-utility Problem...

2 months ago

Solved


Temperature Conversion Utility
There are a few problems on Cody regarding temperature conversion (C to K, C to F, F to C), but none include Rankine. Furthermor...

2 months ago

Solved


Converting Decimal to Binary
Given a decimal number that may include a fractional component, convert it into binary representation. The numbers you are given...

2 months ago

Solved


Concatenated roots
Which is the value of this infinte concatenated roots? <<https://s27.postimg.org/i4hkin7xf/Code_Cogs_Eqn.gif>> Note: If ...

2 months ago

Solved


Side of an equilateral triangle
If an equilateral triangle has area A, then what is the length of each of its sides, x? <<https://i.imgur.com/jlZDHhq.png>> ...

2 months ago

Solved


Number of divisors of a given number
Given a Number n, return the number of his divisors without listing them example: n=14 ; Divisors={1,7,2,14} ; y=4 n=...

2 months ago

Solved


Number of even divisors of a given number
Given a Number n, return the number of its even divisors without listing them. example: n=14 ; EvenDivisors={2,14} ; y=2 ...

2 months ago

Solved


Church Encoding
Church encoded numeral is a function which takes two arguments _f_ and _x_ and applies _f_ to _x_ several times. For example,...

2 months ago

Solved


Accurate Division
Given three integers x, y and d, return x/y (as a string) to d significant digits. Remove leading and trailing zeros. Example...

2 months ago

Solved


Mmm! Multi-dimensional Matrix Multiplication
You have got a couple of multi-dimensional matrices, A and B. And want to multiply them. For the first 2 dimensions, an ordinary...

2 months ago

Solved


Diagonal Pattern
For a positive integer |n|, return an |nXn| matrix |mat| such that the value of each element in row |i| and column |j| is given ...

2 months ago

Solved


Make a rainbow matrix (follow-up to checkerboard matrix)
Given an integer n, make an n-by-n matrix as shown below. The a(1,1) should be 0. As we move away from the top-left, the number ...

2 months ago

Solved


Union Jack Matrix
Create a matrix of odd dimensions that has ones on both diagonals and dividing the matrix into 4 quadrants, resembling a square ...

2 months ago

Solved


Vandermonde Matrix
Create the Vandermonde Matrix of the given vector. The matrix consists of columns as powers of the vector, so the first column i...

2 months ago

Solved


Check if a matrix is a palindrome in all directions
Check if a matrix is a palindrome both vertically and horizontally. You function will return *true* for |[1,2,1]| or |[2,7,2;...

2 months ago

Solved


Produce the following matrix
Produce the following matrix x = [2 3 4] y_correct = [1 1/2 1/3; 2 1 1/4; 3 4 1];

2 months ago

Solved


Make a diamond
Given n, odd number > 1, return n by n matrix consist of "null" and "*" characters arranged like a diamond. No toolbox funct...

2 months ago

Solved


Compute a sum
Write a function to compute the following sum Although a solution is available for general values of the coefficients, the co...

2 months ago

Solved


Find the logic and return the nth number
given a sequence of numbers arranged in the following order: A=0,1,3,4,9,10,12,13,27,28,30,31,36,37,...... Write a function th...

2 months ago

Solved


Find the logic and return the nth number (plus)
This problem is the harder version of Problem 61015 given a sequence of numbers arranged in the following order: A=0,1,3,4,9,1...

2 months ago

Solved


find nth even fibonacci number
1st even fibonacci number=2 ; 2nd even fibonacci number=8 ..

2 months ago

Solved


find the nth fibonacci number
The Fibonacci sequence is defined as follows: give n, find the nth fibonacci number

2 months ago

Solved


Find nth number
The numbers 2 and 7 are called lucky numbers, an integer containing only the digits 2 and 7 is also called lucky number. The pro...

2 months ago

Solved


find the nth number (plus)
this problem is the harder version of Problem 61014. The numbers 2 and 7 are called lucky numbers, an integer containing only t...

2 months ago

Solved


Find the nth composite number.
Everyone heard about the nth prime number. Let's try to find out the nth composite. For example , 1 is the first composite, 10 i...

2 months ago

Solved


Recurring Cycle Length (Inspired by Project Euler Problem 26)
Preface: This problem is inspired by Project Euler Problem 26 and uses text from that question to explain what a recurring cycle...

2 months ago

Solved


Project Euler: Problem 18, Maximum path sum I
By starting at the top of the triangle below and moving to adjacent numbers on the row below, the maximum total from top to bott...

2 months ago

Solved


Project Euler: Problem 16, Sums of Digits of Powers of Two
2^15 = 32768 and the sum of its digits is 3 + 2 + 7 + 6 + 8 = 26. What is the sum of the digits of the number 2^N? Thanks ...

2 months ago

Load more