Solved


Height of a 3D Pyramid
If a pyramid is made with one(1). What will be the height of the pyramid of square shaped base(n*n)? where input is n.

5 years ago

Solved


Strange Number Algorithms
Three integer numbers will be provided to you. Write a function to Step1: Multiply first number by 3. Step2: Add 6 with t...

5 years ago

Solved


Replace secondary diagonal elements of a square array
Replace all the secondary diagonal elements of the square array A with the number n Example: A = [1 2 3 4 5 6 ...

5 years ago

Solved


row-th maximum row elements
Input a is a square matrix of size n*n. Output vector v is of size 1*n. The ith element of output v is the ith largest element o...

5 years ago

Solved


Number Persistence
A number's persistence is the number of steps required to reduce it to a single digit by multiplying all its digits to obtain a ...

5 years ago

Solved


Wrap-around effect
In vector x of length n we define (n+1) position as going back to the first position (so called wrap-around effect). Can you ret...

5 years ago

Solved


Max Change in Consecutive Elements
If an array is given as input then find the index of consecutive elements that represent maximum change. Example: Input ...

5 years ago

Solved


Tridiagonal
Return an n-by-n matrix that has a, b, c as the subdiagonal, main diagonal, and superdiagonal entries in the matrix. Example ...

5 years ago

Solved


counting groups!
This problem is about counting groups. Example If you have x: x = [0.8 0.8 0.8 0.3 0.3 0.4 0.5 0.6 0.6 0.9] then a...

5 years ago

Solved


Time Expansion
How can you slow down any discrete-time signal? Example Input original signal x. x = [1 2 3 -1 -2 -5 -4] We want t...

5 years ago

Solved


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

5 years ago

Solved


Count the non-zero elements along the diagonals that are immediately next to the main diagonal
Suppose, you are being told to write a matrix, *a* as input in MATLAB with having the possibility of containing zero and non-zer...

5 years ago

Solved


For given xx,x, y vectors build spline of x and y and find yy values for xx vector.
For given xx,x, y vectors build spline of x and y and find yy values for xx vector. Example x = [ 1.0000 1.5000 2.00...

5 years ago

Solved


Find the missing numbers.
Total *N* numbers are in the series of natural numbers ( *1,2,3,...,N* ). The input is an array (unsorted) of those natural num...

5 years ago

Solved


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

5 years ago

Solved


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

5 years ago

Solved


Create and Transpose Matrix

5 years ago

Solved


Subtract two numbers

5 years ago

Solved


Kaggle: Reverse Game of Life - Create Isle prior State
<http://www.kaggle.com/c/conway-s-reverse-game-of-life Kaggle's Conway's Reverse Game of Life> contest inspires this Isle Single...

5 years ago

Solved


vector indexes for a matrix
Matlab allows us to use several indexing styles making code simpler and easier to read than using loops. Vectors can have ve...

5 years ago

Solved


The last non-zero digit of a factorial
For given positive integer n, what is the last non-zero digit of n!? Example: factorial(11) = 39916800 Last non-zero d...

5 years ago

Solved


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

5 years ago

Solved


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

5 years ago

Solved


Some tweaks in summation, Can you decode? :)
There are some tweaks in summation that you might observe via test suites Try if you can

5 years ago

Solved


remove single elements
Given a vector of integers, remove the elements that have appeared only once. The output elements should be in exact order as th...

5 years ago

Solved


Neither minima nor maxima
Input v is a vector. Return all the elements of v which are not a local minimum or maximum. Example: v = [1 2 3 4 5] Ou...

5 years ago

Solved


Construyendo matrices parte 2
Construye la siguiente matriz a partir de otros tres vectores/matrices. [ 1 8 15 3 3 3 3 2 9 16 3 3...

5 years ago

Solved


Determina el número de cifras de un número
Crea una función que te devuelva el número de cifras de un número. Algunos ejemplos para ayudarte serían: El número 125 tie...

5 years ago

Solved


Find the number that has most primes those less than it
Given an vector x of integer numbers, find the element of x that has the most primes less than it.

5 years ago

Solved


Cookie Cutters
Given a larger and smaller matrix, perform element-by-element multiplication on the smaller matrix and a sub-matrix of the large...

5 years ago

Load more