Solved


Finding fourier transform of a given vector
Find the fourier transform of a given input vector for ex a=[1 2 3 4] then y=[ 10.0000 + 0.0000i -2.0000 +...

7 years ago

Solved


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

7 years ago

Solved


The Deadly Sin
Melvyn and Banner are fighting over chocolates. Melvyn has X chocolates, while Banner has Y. Whoever has a lesser number of choc...

7 years ago

Solved


The Google Interview: Two Eggs Problem
Consider the following problem, a popular Google interview question: A firm has invented a super-strong egg. For publicity pu...

7 years ago

Solved


Exponents in Factorials
It's time to get excited about numbers!!! Well, we're just dealing with factorials here, but it's still a good reason to get ex...

7 years ago

Solved


Bleed non-zeros to the right
What a title! Yet, it says what I mean. You get a vector, some values and a lot of zeroes. Every zero is replaced by the firs...

7 years ago

Solved


Three grind is shipsstraigt
A function that returns either 'Rock', 'Scissors', or 'Paper' (string). You may succeed or you may fail the (case insensitive) t...

7 years ago

Solved


Calculate compression ratio of engine
Calculate compression ratio of engine given compression volume of cylinder(Vc), piston stroke(s) and valve diameter(d)

7 years ago

Solved


Concatenate matrix into 4 quadrants for given number of iteration
If given a matrix and number, output should be its concatenation like wavelet for given number of iterations. Example a ...

7 years ago

Solved


Calculate the peak value of square wave
Given the peak value of sine wave, calculate corresponding peak value of square wave, if both have same RMS voltage.

7 years ago

Solved


Calculate value of capacitor
Given the value of resistance and time at which capacitor charges to it's 99%. calculate the value of capacitor

7 years ago

Solved


Find same numbers touching each other...
So the goal here is to find any number that is equal to its immediate neighbors and mark it true. Here is some examples: x...

7 years ago

Solved


The sum of individual numbers...
Well this one is taking a number and then summing the individual parts till you reach a value of 1, 2, 3, 4, 5, 6, 7, 8, 9, or 0...

7 years ago

Solved


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

7 years ago

Solved


New Matrix with vector addition on diagonal
consider 2 vectors x=[1 2 3] y=[4 5 6] then generate a new Matrix, where Addition of x & y will be diagonal Elements...

7 years ago

Solved


Amicable numbers
Test whether two numbers are <https://en.wikipedia.org/wiki/Amicable_numbers amicable>, meaning that the sum of the proper divis...

7 years ago

Solved


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

7 years ago

Solved


Check if is a square
Given four coordinates, write a function to check if they form a square on the XY plane.

7 years ago

Solved


Ratio between sum of primer numbers and non-prime numbers
Write a function that calculates the ratio between the sum of the prime numbers lower or equal than x, and the sum of the non-pr...

7 years ago

Solved


Sum of a geometric series
Give the sum of the first 'n' terms of a geometric series, given 'a' as the first term and 'r' as the ratio.

7 years ago

Solved


Get the value 100
Knowing that 123-45-67+89=100, write a function that gives this result for any order of the digits in the input. Otherwise, the ...

7 years ago

Solved


Get the mean digit
Write a function that gives the mean digit (round towards nearest integer) of an input and positive number. For example: x ...

7 years ago

Solved


Remove element(s) from cell array
You can easily remove an element (or a column in any dimension) from a normal matrix, but assigning that value (or range) empty....

7 years ago

Solved


Repeat middle rows and columns of an array
Given an MxN numeric array (A), return an array (B) in which the middle rows and columns have each been repeated once. It may be...

7 years ago

Solved


Alternating 1´s and 0´s in a matrix
Given an odd number n, write a function that creates a matrix y with dimension nxn alternating 1's and 0's, and starting with 1 ...

7 years ago

Solved


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

7 years ago

Solved


Counting Squares
An algorithm starts with a single square and on each of its next iterations adds new squares all around the outside as shown bel...

7 years ago

Solved


Find argmax of a function
You are given vectors x and y (=f(x)). Return the element of x for which f(x) is maximized.

7 years ago

Solved


Pass the Threshold!!
Write a Matlab function that will take as input a matrix of arbitrary dimensions and a scalar threshold value, and return a vec...

7 years ago

Solved


Find the Pattern
Find the pattern between input and output. Write a function that gives the correct output for any input. *Hint: magic*

7 years ago

Load more