Answered

delay signal by 'n' samples

You should use the next command: shifted_data = delayseq(data,DELAY) You must notice that data must be a column vector or it ...

delay signal by 'n' samples

You should use the next command: shifted_data = delayseq(data,DELAY) You must notice that data must be a column vector or it ...

2 mois ago | 1

Solved

Number of Even Elements in Fibonacci Sequence

Find how many even Fibonacci numbers are available in the first d numbers. Consider the following first 14 numbers 1 1 2...

7 mois ago

Solved

Fibonacci-Sum of Squares

Given the Fibonacci sequence defined by the following recursive relation, * F(n) = F(n-1) + F(n-2) * where F(1) = 1 and F(1)...

7 mois ago

Solved

Sort a list of complex numbers based on far they are from the origin.

Given a list of complex numbers z, return a list zSorted such that the numbers that are farthest from the origin (0+0i) appear f...

7 mois ago

Solved

Triangle sequence

A sequence of triangles is constructed in the following way: 1) the first triangle is Pythagoras' 3-4-5 triangle 2) the s...

7 mois ago

Solved

Is this triangle right-angled?

Given any three positive numbers a, b, c, return true if the triangle with sides a, b and c is right-angled. Otherwise, return f...

7 mois ago

Solved

Find a Pythagorean triple

Given four different positive numbers, a, b, c and d, provided in increasing order: a < b < c < d, find if any three of them com...

7 mois ago

Solved

Is this triangle right-angled?

Given three positive numbers a, b, c, where c is the largest number, return *true* if the triangle with sides a, b and c is righ...

7 mois ago

Solved

Area of an Isoceles Triangle

An isosceles triangle has equal sides of length x and a base of length y. Find the area, A, of the triangle. <<http://upload...

7 mois ago

Solved

Dimensions of a rectangle

The longer side of a rectangle is three times the length of the shorter side. If the length of the diagonal is x, find the width...

7 mois ago

Solved

Side of a rhombus

If a rhombus has diagonals of length x and x+1, then what is the length of its side, y? <<http://upload.wikimedia.org/wikipe...

7 mois ago

Solved

Side of an equilateral triangle

If an equilateral triangle has area A, then what is the length of each of its sides, x? <<http://upload.wikimedia.org/wikipe...

7 mois ago

Solved

Area of an equilateral triangle

Calculate the area of an equilateral triangle of side x. <<http://upload.wikimedia.org/wikipedia/commons/e/e0/Equilateral-tr...

7 mois ago

Solved

Length of a short side

Calculate the length of the short side, a, of a right-angled triangle with hypotenuse of length c, and other short side of lengt...

7 mois ago

Solved

The Goldbach Conjecture

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

7 mois ago

Solved

Sum of Two Numbers

Given two integer numbers x and y, calculate their sum and put it in z. Examples: Inputs x = 2, y = 4 Output z is 6 ...

7 mois ago

Solved

Which values occur exactly three times?

Return a list of all values (sorted smallest to largest) that appear exactly three times in the input vector x. So if x = [1 2...

8 mois ago

Solved

Remove the vowels

Remove all the vowels in the given phrase. Example: Input s1 = 'Jack and Jill went up the hill' Output s2 is 'Jck nd Jll wn...

8 mois ago

Answered

Sum the digits of a number?

You can try this: n = 525; sum(str2num(num2str(sum(str2num(num2str(n)')))'))

Sum the digits of a number?

You can try this: n = 525; sum(str2num(num2str(sum(str2num(num2str(n)')))'))

8 mois ago | 0

Solved

Summing digits

Given n, find the sum of the digits that make up 2^n. Example: Input n = 7 Output b = 11 since 2^7 = 128, and 1 + ...

8 mois ago

Solved

Return the 3n+1 sequence for n

A Collatz sequence is the sequence where, for a given number n, the next number in the sequence is either n/2 if the number is e...

8 mois ago

Solved

Most nonzero elements in row

Given the matrix a, return the index r of the row with the most nonzero elements. Assume there will always be exactly one row th...

8 mois ago

Solved

Who Has the Most Change?

You have a matrix for which each row is a person and the columns represent the number of quarters, nickels, dimes, and pennies t...

8 mois ago

Solved

Find the numeric mean of the prime numbers in a matrix.

There will always be at least one prime in the matrix. Example: Input in = [ 8 3 5 9 ] Output out is 4...

8 mois ago

Solved

Interpolator

You have a two vectors, a and b. They are monotonic and the same length. Given a value, va, where va is between a(1) and a(end...

8 mois ago

Solved

Remove any row in which a NaN appears

Given the matrix A, return B in which all the rows that have one or more <http://www.mathworks.com/help/techdoc/ref/nan.html NaN...

8 mois ago

Solved

Generate a vector like 1,2,2,3,3,3,4,4,4,4

Generate a vector like 1,2,2,3,3,3,4,4,4,4 So if n = 3, then return [1 2 2 3 3 3] And if n = 5, then return [1 2 2...

8 mois ago

Solved

Make a random, non-repeating vector.

This is a basic MATLAB operation. It is for instructional purposes. --- If you want to get a random permutation of integer...

8 mois ago

Solved

Magic is simple (for beginners)

Determine for a magic square of order n, the magic sum m. For example m=15 for a magic square of order 3.

8 mois ago

Solved

Sum all integers from 1 to 2^n

Given the number x, y must be the summation of all integers from 1 to 2^x. For instance if x=2 then y must be 1+2+3+4=10.

8 mois ago