A résolu


Create a random logical vector of N elements of which M are true.
Your task for tomorrow is to create a random binary (logical) vector of N elements of which M are true. For example: ran...

environ un an il y a

A résolu


Basic arrays operations.
Apply element-by-element binary operation 'fun' to two arrays (A and B).

environ un an il y a

A résolu


Number of toolboxes?
Return a number equal to the number of toolboxes available to the Cody solvers.

environ un an il y a

A résolu


QWERTY coordinates
Given a lowercase letter or a digit as input, return the row where that letter appears on a standard U.S. QWERTY keyboard and it...

environ un an il y a

A résolu


Kaprekar Steps
6174 is the Kaprekar constant. All natural numbers less than 10,000 (except some with same digits) can be reduced to 6174 in the...

environ un an il y a

A résolu


Balanced number
Given a positive integer find whether it is a balanced number. For a balanced number the sum of first half of digits is equal to...

environ un an il y a

A résolu


Knight's Tour Checker
Given a matrix a, determine whether or not a legal <http://en.wikipedia.org/wiki/Knight's_tour knight's tour> is present. The kn...

environ un an il y a

A résolu


Duplicates
Write a function that accepts a cell array of strings and returns another cell array of strings *with only the duplicates* retai...

environ un an il y a

A résolu


Find the nearest integer
Given a vector of integers and a real number find the closest integer. EX: >> a = [2 4 5 6 8 10]; >> b = 4.6; >> nea...

environ un an il y a

A résolu


Determine if a Given Number is a Triangle Number
*Description:* Determine if the elements of an input array are triangle numbers and return the result as an array with the sa...

environ un an il y a

A résolu


Armstrong Number
Determine whether the given input n-digit number is Armstrong Number or not. Return True if it is an Armstrong Number. An n-Dig...

environ un an il y a

A résolu


Calendar Matrix
Return a calendar matrix for the given values of month and year. Assume that Sunday is the first day of the week. The resulting ...

environ un an il y a

A résolu


Make a run-length companion vector
Given a vector x, return a vector r that indicates the run length of any value in x. Each element in r shows how many times the ...

environ un an il y a

A résolu


The Goldbach Conjecture, Part 2
The <http://en.wikipedia.org/wiki/Goldbach's_conjecture Goldbach conjecture> asserts that every even integer greater than 2 can ...

environ un an il y a

A résolu


Convert decimal to hex as shown in test cases
Convert decimal to hex as shown in test cases.

environ un an il y a

A résolu


Add two hex numbers
Add two hex numbers

environ un an il y a

A résolu


Try and Catch Simple Example
Try and Catch Simple Example <http://in.mathworks.com/help/matlab/ref/try.html Example> Vector x=[1 4 6 8 10]; Create...

environ un an il y a

A résolu


Create Vector containing following elements
Create Vector containing following elements A=[pi eps NaN inf -inf flintmax];

environ un an il y a

A résolu


Vector Multiplication
Vector Multiplication of three matrix as shown in test cases.

environ un an il y a

A résolu


Find out total non zero element of matrix
Find out Non zero element of matrix A=magic(5) 17 24 1 8 15 23 5 7 14 16 4 6...

environ un an il y a

A résolu


Append two matrix as shown below example
Append two matrix as shown below example A=[1 2; 3 4] and B=[5 6;7 8] Answer must be 1 2 5 6 3...

environ un an il y a

A résolu


Add two different item as shown in example
Add two different item as shown in example x=5; y='ab'; Then output must be'5ab';

environ un an il y a

A résolu


Cumulative product of a vector
Cumulative product of a vector example x=[1 2 5 10], then answer must be [ 1 2 10 100] *If you like this prob...

environ un an il y a

A résolu


Find out magnitude of vector
Find out magnitude of vector. Say x=[1 2 3], then answer must sqrt(1^2+2^2+3^2) Please don't use sum function. If you l...

environ un an il y a

A résolu


Is it column vector?
Is it column vector? Check vector for column vector without using iscolumn function.

environ un an il y a

A résolu


Find difference of two set as per example
Find difference of two set as per example Say x=[1:5] and y=[2:6] then, set_diff(x,y) should give output[1] and set_diff(y...

environ un an il y a

A résolu


Find Out sum of principal diagonal element of given matrix
Find out sum of principal diagonal element of given matrix If A=[1 0 0; 0 1 0;0 0 1], then answer must be 3.

environ un an il y a

A résolu


Union of two set decreasing order
Union of two set decreasing order Say, x=[1 2 5] and y=[5 7 8] then answer must be [8 7 5 2 1]

environ un an il y a

A résolu


Generate vector according to sign of vector
Generate vector according to sign of vector Example: If A=[-2 0 5] then output must be[-1 0 1] meaning that for negative n...

environ un an il y a

A résolu


Replace odd number in given matrix by zero
Replace the odd numbers in a given matrix with zero. Example A = [ 17 24 1 8 15 23 5 7 ...

environ un an il y a

Charger plus