Solved


Matlab Basics II - Velocity of a particle
A particle is moving in space, such that it's velocity is given by: <<http://s30.postimg.org/5rf1xtvj5/cody1.png>> write a...

6 years ago

Solved


Penny flipping - calculate winning probability (easy)
Two players are playing a fair penny flipping game. For each flip, the winner adds one penny from the loser's collection to his/...

6 years ago

Solved


Array GCD
* Find Greatest Common Divisor in a given array * Function Template: function ans = arraygcd(a) % a=[45 15 200 ...

6 years ago

Solved


generate a matrix of Legendre polynomials
input = x - the degree of the polynomial output = matrix of Legendre polynomials

6 years ago

Solved


calculate linear convolution two vectors
for e.g in: a = [1 2 3] b = [4 5 6] out: y = [4 13 28 27 18]

6 years ago

Solved


Calculate the integral of the polynomial
for e.g. in = [3 2 1] out = [1 1 1 0]

6 years ago

Solved


Number of odd and even elements within matrix
Input(m) - any matrix with integers Output(n) - n(1)=number of odd elements, n(2)=number of even elements Example: * m=...

6 years ago

Solved


CARDS PROBLEM
Read my mind and tell me the card number that I have now in my hands.

6 years ago

Solved


Add more zeros
Find code that adds one 0 to each sequence of 0 in a string (composed with only 0 or 1). For example: '1010' -> '100100' ...

6 years ago

Solved


Make a Star Pyramid
Create a star pyramid. First line will have 1 star, second will have two stars and so on... a basic program which is easily done...

6 years ago

Solved


create a circulant matrix
create a circulant matrix

6 years ago

Solved


Generate binary combinations for a given number of bit(s)
Generate the binary combination as in the example below. Example: If you are given: bin_comb(2) The answer will be: ...

6 years ago

Solved


BULLSEYE Part 3: Reference Problem 18 BULLSEYE
Given n (always odd), return output a that has concentric rings of the 69s and 0s around the center point. Examples: Input ...

6 years ago

Solved


Make combination of two given matrices.
Make a combination of the two given matrices as a given example. Example: input1 = [1 2 3; 4 5 6]; input2 = [7 8; 9 10...

6 years ago

Solved


ABBREVIATION
Abbreviate the given string. Consider Only Capital Letters. EXAMPLE If input is 'Abbreviation of The Given String' then ou...

6 years ago

Solved


ZigZag matrix with reflected format
ZigZag MATRIX with REFLECTED format. We have only input x. We have to create a matrix in the following pattern. input n=5...

6 years ago

Solved


Power The Product
EXAMPLE: INPUT x=10 & y=10 OUTPUT z=1000000 or, INPUT x=2 & y=3 OUTPUT z= 216 you just need to calculate the product first...

6 years ago

Solved


SHIFT REGISTER
INPUT IS DECIMAL NUMBER. CONVERT IT INTO A BINARY SEQUENCE. THEN SHIFT THE SEQUENCE BY AN AMOUNT OF GIVEN NUMBER OF BITS. FOR E...

6 years ago

Solved


COUNT VOWEL 2
The objective of this problem is to determine the number of unique vowels used in the given string. Now count vowels in STRI...

6 years ago

Solved


Matrix FUN
Given a Matrix M, find out the number of elements of matrix that are divisible by 3. M = [1 2 3;4 5 6;7 8 9]; ou...

6 years ago

Solved


Replace values under a limit
For a vector x and number n, the goal is to find every element of x inferior to n and replace it by n. Example x= [ 1 2 3...

6 years ago

Solved


Generate the Matrix!
Given n, generate the following matrix: a = [ n n-1 n-2 ... 2 1; n-1 n-1 n-2 ... 2 1; n-2 n-2 n-2 ... 2 1;...

6 years ago

Solved


~~~~~~~ WAVE ~~~~~~~~~
|The WAVE generator| Once upon a time there was a river. 'Sum' was passing by the river. He saw the water of the river that w...

6 years ago

Solved


Product of Array
Given an array of numbers. Get the product of the array.

6 years ago

Solved


We love vectorized solutions. Problem 1 : remove the row average.
Given a 2-d matrix, remove the row average from each row. Your solution MUST be vectorized. The solution will be tested for ac...

6 years ago

Solved


Upper triangular matrix
Create a function to retrieve the upper triangular matrix of a matrix (without using tril). The matrix will always be square. ...

6 years ago

Solved


Find number of days
The input is two date in string format (dd-mm-yyyy) find out the number of days between these two dates. Example: input: ...

6 years ago

Solved


Determine if input is a Narcissistic number
<http://en.wikipedia.org/wiki/Narcissistic_number Narcissistic number> is a number that is the sum of its own digits each raised...

6 years ago

Solved


Weave two vectors into one
Weave the two given vectors into one as shown below. Example: If a = [1 1 1] b = [0 0 0] then y = [1 0 1 0 ...

6 years ago

Solved


Guess Cipher
Guess the formula to transform strings as follows: 'Hello World!' --> 'Ifmmp Xpsme!' 'Can I help you?' --> 'Dbo J ifmq zpv...

6 years ago

Load more