A résolu


Unique values without using UNIQUE function
You must return unique values in a vector in *stable* mode without using the unique function. About stable order flag: ...

environ un an il y a

A résolu


Reference Index Number
Given a reference set R of elements (each unique but identical in type), and a list V of elements drawn from the set R, possibly...

environ un an il y a

A résolu


Change the sign of even index entries of the reversed vector
change the signs of the even index entries of the reversed vector example 1 vec = [4 -1 -2 9] ans = [9 2 -1 -4] example2...

environ un an il y a

A résolu


Decimation
When dealing to the Roman Army, the term decimate meant that the entire unit would be broken up into groups of ten soldiers, and...

environ un an il y a

A résolu


Insert zeros into vector
Insert zeros after each elements in the vector. Number of zeros is specified as the input parameter. For example: x = [1 ...

environ un an il y a

A résolu


Determine the number of odd integers in a vector
Determine the number of unique odd integers in a vector. Examples: Input x = [2 5 8 3 7 1]; Output y = 4; Inp...

environ un an il y a

A résolu


Max index of 3D array
Given a three dimensional array M(m,n,p) write a code that finds the three coordinates x,y,z of the Maximum value. Example ...

environ un an il y a

A résolu


Set a diagonal
Given a matrix M, row vector v of appropriate length, and diagonal index d (where 0 indicates the main diagonal and off-diagonal...

environ un an il y a

A résolu


Create a vector whose elements depend on the previous element
The idea is to create a vector A whose elements depend on the previous element : *A(i+1) = 2*A(i)+1* *2 Inputs*: - A : The...

environ un an il y a

A résolu


Implement a bubble sort technique and output the number of swaps required
A bubble sort technique compares adjacent items and swaps them if they are in the wrong order. This is done recursively until al...

environ un an il y a

A résolu


Create an n-by-n null matrix and fill with ones certain positions
The positions will be indicated by a z-by-2 matrix. Each row in this z-by-2 matrix will have the row and column in which a 1 has...

environ un an il y a

A résolu


Create an index-powered vector
Given a input vector x, return y as index-powered vector as shown below. Example x = [2 3 6 9] then y should be [...

environ un an il y a

A résolu


Oh Zero Zero Zero!!!
Hello all, So you have to find the largest section of zeros in a vector and then find the length of those zeros and there start...

environ un an il y a

A résolu


Find last zero for each column
Given a numeric array of arbitrary size, return the row index of the last zero for each column. If a column contains all nonzero...

environ un an il y a

A résolu


Symmetry of vector
Determine whether the vector is symmetric or not (vector could be even or odd in length). For example: x = [1 2 3 3 2 1] is s...

environ un an il y a

A résolu


Great Circle Distance
Find shortest between two points on a ball given their azimuthal and polar angles (in degrees) as well as the radius of the sphe...

environ un an il y a

A résolu


Right and wrong
Given a vector of lengths [a b c], determines whether a triangle with those sides lengths is a right triangle: <http://en.wikipe...

environ un an il y a

A résolu


Smallest distance between a point and a rectangle
Given two points *x* and *y* placed at opposite corners of a rectangle, find the minimal euclidean distance between another poin...

environ un an il y a

A résolu


Circumscribed circles
Given the lengths of the 3 sides of a triangle, output the radius of the circumscribed circle. Example: [3 4 5] -> 2.5

environ un an il y a

A résolu


Angle between Two Vectors
The dot product relationship, a dot b = | a | | b | cos(theta), can be used to determine the acute angle between vector a and ve...

environ un an il y a

A résolu


Numbers with prime factors 2, 3 and 5.
Make a function which takes one positive integer n and returns a matrix with the numbers of the form (2^i)*(3^j)*(5^k) which are...

environ un an il y a

A résolu


Factorize THIS, buddy
List the prime factors for the input number, in decreasing order. List each factor only once, even if the factorization includes...

environ un an il y a

A résolu


Get all prime factors
List the prime factors for the input number, in decreasing order. List each factor. If the prime factor occurs twice, list it as...

environ un an il y a

A résolu


Multiples of a Number in a Given Range
Given an integer factor _f_ and a range defined by _xlow_ and _xhigh_ inclusive, return a vector of the multiples of _f_ that fa...

environ un an il y a

A résolu


Proper Factors
Generate the proper factors of input integer x and return them in ascending order. For more information on proper factors, refer...

environ un an il y a

A résolu


Smith numbers
Return true if the input is a Smith number in base ten. Otherwise, return false. Read about Smith numbers at http://en.wikipedia...

environ un an il y a

A résolu


Prime factor digits
Consider the following number system. Calculate the prime factorization for each number n, then represent the prime factors in a...

environ un an il y a

A résolu


Calculate the Number of Sign Changes in a Row Vector (No Element Is Zero)
For a row vector: V=[7 1 2 -3] there is one sign change (from 2 to -3). So, the function you write must return N=1. F...

environ un an il y a

A résolu


There are 10 types of people in the world
Those who know binary, and those who don't. The number 2015 is a palindrome in binary (11111011111 to be exact) Given a year...

environ un an il y a

A résolu


Sum of series VII
What is the sum of the following sequence: Σ(km^k)/(k+m)! for k=1...n for different n and m?

environ un an il y a

Charger plus