A résolu


Minimum Maximum Sort Array
sort one array by put minimum value followed by maximum as follow a=[2 3 1 5] and the solution is y=[1 5 2 3 3 2 5 1];

plus de 7 ans il y a

A résolu


Find prime number couples
Given a vector a, which will always contain at least one pair of prime numbers couple, return a matrix called 'couple' in which ...

plus de 7 ans il y a

A résolu


Linear Least Squares (L2 fitting problem )
Given a set of real measurements (x(i), y(i)) find a line sol(1)x + sol(2) (more specifically furnish the vector with...

plus de 7 ans il y a

A résolu


Check capital letters
Check if each first letter of a string is a capital letter. for example: 'This Is Ok' gives a true answer and 'This Is not Ok' ...

plus de 7 ans il y a

A résolu


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

plus de 7 ans il y a

A résolu


Prime Product
My professor has given a sequence of N numbers as a1, a2, ..., aN and asked me to find the smallest possible value of ai * aj su...

plus de 7 ans il y a

A résolu


Find the repeating elements and repetitions of a row vector.
So let's say that x is a vector, for example, x = [4, 4, 5, 5, 5, 6, 7, 7,8, 8, 8, 8] Now we want to get the following two ve...

plus de 7 ans il y a

A résolu


Smallest n, for n! to have m trailing zero digits
For given positive integer n, its factorial often has many trailing zeros, in other words many factors of 10s. In order for n! t...

plus de 7 ans il y a

A résolu


Substring Extraction
In a given string, find the substring between Start_string and End_string. You will have to include or exclude the Start_str...

plus de 7 ans il y a

A résolu


Rewrite setdiff to account for non-unique values
Setdiff(a,b) is a function that will remove all values of b from a. Sometimes, you need this function to do a little bit extra,...

plus de 7 ans il y a

A résolu


Choose group with people
How many ways can you choose n groups of n people from n^2 people, assuming the groups are distinct? The number of people i...

plus de 7 ans il y a

A résolu


Normie Function (2)
Another _Normie Function_ defined as _f(n)= f(n-1)+f(n-2)+f(n-3)_ , *when n>3* and _1_ , *when n<=3*. *Find the nth term of this...

plus de 7 ans il y a

A résolu


Polar Form Complex Number Entry
Write a function that takes the magnitude and angle(in degrees) of a complex number and returns a complex variable. Positive ang...

plus de 7 ans il y a

A résolu


Fractal: area and perimeter of Koch snowflake
Starting from an equilateral triangle with side 's', what is the area and perimeter of Koch snowflake at n'th recursive iteratio...

plus de 7 ans il y a

A résolu


Explode string
Break a sentence into cell of words

plus de 7 ans il y a

A résolu


Extract part elements of matrix into one new matrix
Given a matrix that includes different nonzero and zero entries, extract the nonzero elements and form a new matrix. The new mat...

plus de 7 ans il y a

A résolu


Find if a given sentence is a palindrome
Given a string/character array, return true if the string is a palindrome else returns false. For example: sample_text =...

plus de 7 ans il y a

A résolu


Maximum of ND-array
Find the maximum element of a N dimensional array. Example: A=[1 2 4 ; -20 4 10]; The maximum is 10.

plus de 7 ans il y a

A résolu


Five Fingers
A little girl has just learnt how to count from 1 to N using the five fingers of her left hand as follows. She starts by calling...

plus de 7 ans il y a

A résolu


Penny Distribution Machine
A machine consists of a row of boxes. To start, one places N pennies in the leftmost box. The machine then redistributes the pen...

plus de 7 ans il y a

A résolu


God of War: The Chains Of Olympus
The Spartan warrior, Kratos, is held by a chain of _n > 1_ links in the underworld. His only chance of survival is to break the ...

plus de 7 ans il y a

A résolu


Nash Equilibrium
In game theory, a player's *strategy* is any of the options that can be chosen in a setting where the pay-off depends not only o...

plus de 7 ans il y a

A résolu


Get a new matrix by mapping each element of an arbitrary-sized input matrix using lookup table
A is a matrix of any size and dimension. Each element of matrix A belongs to the set S of natural numbers up to N. B is a vector...

plus de 7 ans il y a

A résolu


Optimization of cylinder surface area
Optimization of a cylinder surface area. What are the best parameters (radius and height) to get the minimum cylinder surface a...

plus de 7 ans il y a

A résolu


Scalar Matrix Manipulation
Assume, input x is a scalar matrix such as, x = 2 0 0 0 2 0 0 0 2 th...

plus de 7 ans il y a

A résolu


short or buy ? take the opportunity
you had already calculated a theoretical stock value, now you checked in bloomberg the quoted price of that stock and you have t...

plus de 7 ans il y a

A résolu


The number of trailing zero digit of a factorial
For given positive integer n, take factorial of that number. How many trailing zeros does it have? Example: factorial(11) = 3...

plus de 7 ans il y a

A résolu


Matrix Manipulation
Given an m*n matrix, see if a matrix contains any 0s in any row. if it contains 0 anywhere in any particular row, delete that ro...

plus de 7 ans il y a

A résolu


convert 2D array of ones and zeros to checkerboard array of [1,2] where the original array was ones and zero elsewhere
Given a 2D array of ones and zeros, generate an equivalent sized checkerboard array of ones and twos. The checkerboard pattern s...

plus de 7 ans il y a

A résolu


Write a function to calculate step size delta if bits per sample and input range is given for quantization.
numBit = bits per sample; range = input max value - min value; delta = step size; l = number of levels;

plus de 7 ans il y a

Charger plus