Solved

Find the centre of an arc and its radius

Given two points on an arc (x0,y0) and (x1,y1) and the angle between them, alpha. Return the centre of the circle and the rad...

2 months ago

Solved

Is it a mail?

Electronic mail, or email, is a method of exchanging digital messages between people using digital devices such as computers, mo...

2 months ago

Solved

Spin Matrices

The spin of a particle is a fundamental property in quantum physics. We shall inspect below matrix representations of such spin...

2 months ago

Solved

Finding operators in a MATLAB function in a string.

The aim is to find if there is an operator inside a MATLAB function call in a formula. The input is a string and the output is a...

2 months ago

Solved

Game of Nim

The Game of Nim is a famous studied 2 player strategy game. <http://en.wikipedia.org/wiki/Nim> There are 3 heaps, and you...

2 months ago

Solved

Project Euler: Problem 14, Longest Collatz sequence

The following iterative sequence is defined for the set of positive integers: n → n/2 (n is even) n → 3n + 1 (n is odd) U...

2 months ago

Solved

Expression or variable?

Test if arguments of the function are all variables (workspace variables names). Return 1 if yes, 0 if no. For example : ...

2 months ago

Solved

Moore-Penrose pseudoinverse of matrix

Find the command for Moore-Penrose pseudoinverse of matrix and solve

2 months ago

Solved

Rearrange the given matrix to have all its zeros climb up to the top of each column - using for loops.

Given a matrix x, *using loops only* return a matrix y, in which all the zeros have "climbed" up to the top. That is, any zeros ...

2 months ago

Solved

Pascal's Equilateral triangle inside a Matrix!!!

Given a number of row 'n', generate the following pascal's matrix 'p' where spaces are filled by 'zeros'. number of row, n = ...

2 months ago

Solved

exactly?

given two strings of numeric expressions such as '1-7/14' and '11/22+0.2^2', return 1 if they are numerically exactly equal othe...

2 months ago

Solved

Kaggle: Reverse Game of Life - Create Isle prior State

<http://www.kaggle.com/c/conway-s-reverse-game-of-life Kaggle's Conway's Reverse Game of Life> contest inspires this Isle Single...

2 months ago

Solved

Fun Race

* Given two unary functions foo and goo. * Check whether foo(0) runs faster than goo(0). * Output 1 if foo is faster, otherwis...

2 months ago

Solved

Lights Out 14 - 5x5, four stages, x moves

<https://en.wikipedia.org/wiki/Lights_Out_(game) Lights Out> is a logic game wherein all lights need to be turned off to complet...

2 months ago

Solved

Lights Out 13 - 5x5, three stages, x moves

<https://en.wikipedia.org/wiki/Lights_Out_(game) Lights Out> is a logic game wherein all lights need to be turned off to complet...

2 months ago

Solved

Mastermind

We are playing the boardgame mastermind <https://en.wikipedia.org/wiki/Mastermind_(board_game)>. The game master has created a 4...

2 months ago

Solved

Mastermind III: Solve in 1

<https://en.wikipedia.org/wiki/Mastermind_(board_game) Mastermind> is a code breaking logic puzzle. A pattern of 6 colors(values...

2 months ago

Solved

Mastermind I: Solve all 1296 cases

<https://en.wikipedia.org/wiki/Mastermind_(board_game) Mastermind> is a code breaking logic puzzle. A pattern of 6 colors(values...

2 months ago

Solved

Mastermind II: Solve in 8 or less

<https://en.wikipedia.org/wiki/Mastermind_(board_game) Mastermind> is a code breaking logic puzzle. A pattern of 6 colors(values...

2 months ago

Solved

Mastermind IV: Optimal Solver - max of 5 guesses

<https://en.wikipedia.org/wiki/Mastermind_(board_game) Mastermind> is a code breaking logic puzzle. A pattern of 6 colors(values...

2 months ago

Solved

Win all the time!

This is a 2-players game. One of them is your algorithm. Your algorithm must win in all games. In this game there are 3 rows...

2 months ago

Solved

Lagrange Interpolation

Given a set of measurements of dependent variables in a vector, Y, that vary with one independent variable in a vector, X, calcu...

2 months ago

Solved

Newton Interpolation

Given a set of measurements of dependent variables in a vector, Y, that vary with one independent variable in a vector, X, calcu...

2 months ago

Solved

Arithmetic/geometric sequence, 50/50

a(1) = 0 a(2) = 1 a(2*N) = sqrt(a(2*N-1)*a(2*N+1)) a(2*N+1) = (a(2*N)+a(2*N+2))/2 given _n_ return _a(n)_

2 months ago

Solved

Mirror, mirror on the wall, who is fairest of them all?

The Elo rating system was featured in the movie *The Social Network* during the <https://www.youtube.com/watch?v=BzZRr4KV59I/ al...

2 months ago

Solved

Is this function available?

Sometimes it is difficult to remember which functions are not allowed on the Cody platform. Given a function as a string, return...

2 months ago

Solved

A little bit of luck needed

This one may require a little bit of guess work, but it is possible. Hints: - The same solution might fail the tests once and ...

2 months ago

Solved

Create different color vectors.

When producing figures with multiple lines on, you often want the lines to all be visible and different colors. Given the need f...

2 months ago