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


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


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


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


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


Angle bisectors
Given 2 direction vectors, calculate the *_two_ (2) normalized angle bisectors* (which are perpendicular between them). Input...

environ 10 ans il y a

A résolu


Integer complexity
Given an array, n, of positive integers, return an array, c, of the same size, in which each element is the <https://en.wikipedi...

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


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


Polygon division
Given the number of vertices (or sides), n, of a planar convex polygon, return the number of ways, w, in which you can divide th...

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


Number construction II
Given a positive integer, n, return a, b, c and d, such that 1. n = a*2^b+c*3^d 2. a, b, c and d are all positive integers...

environ 10 ans il y a

A résolu


Number construction I
Given a positive integer, n, return a, b, c and d, such that 1. n = a*sqrt(b)+c*sqrt(d) 2. a, b, c and d are all positive ...

environ 10 ans il y a

A résolu


String Find with Wildcards of a Cell array
Given a cell array of strings and a search string with single character (?) or multiple character (*) wildness return the indice...

environ 10 ans il y a

A résolu


Rolling maximums above a threshold
You are given either a vector or a 2-D matrix M and a threshold value of t. Write a script that will calculate how many times t...

environ 10 ans il y a

A résolu


Sorting integers by their digits (Level 4)
This is the next step up from <http://www.mathworks.com/matlabcentral/cody/problems/42815-sorting-integers-by-their-digits-level...

environ 10 ans il y a

A résolu


Sorting integers by their digits (Level 3)
This is the next step up from <http://www.mathworks.com/matlabcentral/cody/problems/42811-sorting-integers-by-their-digits-level...

environ 10 ans il y a

A résolu


Sorting integers by their digits (Level 2)
This is the next step up from <http://www.mathworks.com/matlabcentral/cody/problems/42809-sorting-integers-by-their-digits Probl...

environ 10 ans il y a

A résolu


Sorting integers by their digits (Level 1)
Given a vector, v, of positive integers, return a vector, w, by sorting v in ascending order, such that primary sorting is done ...

environ 10 ans il y a

A résolu


Pipeline
Do something that makes x> f1 > f2 ... > fn equal to fn(...f2(f1(x))...) * x : MATLAB object * fi: function handle ...

environ 10 ans il y a

A résolu


Britney Unfolded
You have a long, narrow strip of paper. You are going to fold this strip of paper length-wise in half, than fold the folded stri...

plus de 10 ans il y a

A résolu


house of cards
How many cards do one need to build a house of cards with n stages? Short explanation: /\ 2 cards for 1 stage ...

plus de 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....

plus de 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...

plus de 10 ans il y a

A résolu


means
Calculate the arithmetic, the geometric and the harmonic mean of a given vector (with positive elements) and return them in a ve...

plus de 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...

plus de 10 ans il y a

A résolu


How many ways to write a number
Given two positive numbers n and k, where n>=k. In how many ways can we write n as sum of k positive numbers. Same numbers but d...

plus de 10 ans il y a

A résolu


MATLAB Prison: Absolute Cruelty
The warden of MATLAB prison is particularly cruel. Space is in short supply (too many criminals with bad grammar, no examples an...

plus de 10 ans il y a

Charger plus