A résolu


Identify the sequence
Given a row vector, x, return 1 if it is an arithmetic series, or 2 if it is a geometric series. If it is neither, return 0. ...

environ 10 ans il y a

A résolu


Does this dress make me look fat
For the input string "Does xyz make me look fat" output the string "No, xyz does not make you look fat"

environ 10 ans il y a

A résolu


RGB to CMYK
Convert an RGB code to the corresponding CMYK code for printing. The RGB input is a [1×3] double array between 0 and 1. ...

environ 10 ans il y a

A résolu


Fifteen Parity Check
The Matlab function fifteen initializes the 4x4 array with randperm(16), which produces 50% unsolvable puzzles. A <https://en.wi...

environ 10 ans il y a

A résolu


Circle area using pi
Given a circle's radius, compute the circle's area. Use the built-in mathematical constant pi.

environ 10 ans il y a

A résolu


Height of a right-angled triangle
Given numbers a, b and c, find the height of the right angled triangle with sides a and b and hypotenuse c, for the base c. If a...

environ 10 ans il y a

A résolu


Crunch that matrix!
You are given an M x N matrix. Write a script that will compress this matrix into an M x (N/3) matrix, where each of the terms ...

environ 10 ans il y a

A résolu


LMI Twins : Fuzzy Image matching
The image below from <http://logicmastersindia.com/2016/04P/ Logic Masters India Marathon 2016> is puzzle "Twins Co-Ordinates" w...

environ 10 ans il y a

A résolu


Approximate e
Given a and n, compute and approximation to f = a * e ^ n, without the use of exp, string operations, or floating point numbers....

environ 10 ans il y a

A résolu


Lambert's W
Matlab cody does not support lambertw. Try to create a lambert's w function yourself. Lambert's W is the function that solves...

environ 10 ans il y a

A résolu


Sum of logarithms
Given a vector, v, of real positive numbers, compute the sum, s, of the base-10 logarithms of the elements of v, without the use...

environ 10 ans il y a

A résolu


jumping astronauts
The surface gravity on the moon is approximately 2 m/s^2. Thats why an funny astronauts feels as light as a feather and jumps fr...

environ 10 ans il y a

A résolu


Sum two real numbers
It seems easy, but... You cannot use +, -, plus, diff, cumsum, *, prod, times, etc.

environ 10 ans il y a

A résolu


generate number in particular way
A = [1 5 2 7]; MAX = 10; generate a array Y = [1 2 2 2 2 2 3 3 4 4]; i.e. total eleme...

environ 10 ans il y a

A résolu


Euler–Mascheroni constant
Approximate the Euler-Mascheroni constant using the series representation gamma_n=\sum_{k=1}^{n} [1/k-ln(1+1/k)] Calculat...

environ 10 ans il y a

A résolu


Coefficients and vertex of a parabola given 3 points
Given 3 points, each defined by x and y, compute the coefficients: [a,b,c] of a parabola with equation: y = ax^2 + bx + c passin...

environ 10 ans il y a

A résolu


Detect pair of equal values in a Matrix
A 2D matrix of 2 rows and N columns with random integer numbers. A = [3 1 2 4 6 6 7; 7 3 2 1 5 2 4] ...

environ 10 ans il y a

A résolu


Return the sequence element III
This problem is related to <http://www.mathworks.com/matlabcentral/cody/problems/42832-segmented-number-sequence Problem 42832>....

environ 10 ans il y a

A résolu


Increasing sub-sequence (Level 1)
Given a vector, v, of real numbers, return a positive integer, n, representing the longest contiguous increasing sub-sequence co...

environ 10 ans il y a

A résolu


Juggler sequence revisited
This problem is related to <http://www.mathworks.com/matlabcentral/cody/problems/42835-return-the-sequence-element-ii Problem 42...

environ 10 ans il y a

A résolu


Return the sequence element II
Given positive integers x and n, return a positive integer, y, which is the nth term in the <https://en.wikipedia.org/wiki/Juggl...

environ 10 ans il y a

A résolu


Return the sequence element
Given a positive integer, x, return a positive integer, y, which is the nth term in the sequence [1 2 2 3 3 3...], in which one ...

environ 10 ans il y a

A résolu


Babylonian method
Calculate the square root of a given positive number a using the Babylonian method (https://en.wikipedia.org/wiki/Methods_of_co...

environ 10 ans il y a

A résolu


Hilbert numbers
Given a positive integer, n, return h as follows: 1. If n is not a <https://en.wikipedia.org/wiki/Hilbert_number Hilbert numb...

environ 10 ans il y a

A résolu


fractal circles
Create a fractal with circles using the same process as the Sierpinski triangle (https://en.wikipedia.org/wiki/Sierpinski_trian...

environ 10 ans il y a

A résolu


Why?
Why has been a major question throughout history; why did Napoleon fail, why do we exist, why must I work a pageant, to name a f...

environ 10 ans il y a

A résolu


Find the path through the cell
A list of cells is given. Return true if the elements of the list increase monotonically (each element is strictly larger tha...

environ 10 ans il y a

A résolu


Accessing values in a cell
You are given c, which is a 1xN cell array, and a and b, which are each two 1xM vectors. Your job is to give the bth value in t...

environ 10 ans il y a

A résolu


Full combinations
Given n input vectors x1, x2, …, xn, generate a p*n matrix y whose rows contain all element-wise combinations of the vectors x1,...

environ 10 ans il y a

A résolu


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

environ 10 ans il y a

Charger plus