Solved

MATLAB Basics: Complex Conjugates

For a given complex number, x, return the complex conjugate, y.

2 months ago

Solved

MATLAB Basics: Complex Argument

For a given complex number, x, return the argument, y, in degrees.

2 months ago

Solved

Peg Solitaire - Apply Move

About Peg Solitaire . Previous Problem. Consider inital board; If we move the peg located on (4,6) to the left (4) directio...

2 months ago

Solved

Peg Solitaire - Get Possible Moves

About Peg Solitaire. Consider following initial board; (1) indicates there is a peg and (0) indicates empty holes. For thi...

2 months ago

Solved

Create a function that gives a matrix like the following

x=3 y= [1 -1 -1 0 1 -1 0 0 1]; -------------------------------- x=5 y= [ 1 -1 -...

2 months ago

Solved

Roman numbers: how old is that building?

The front of old buildings sometimes show the year when they were built in roman numbers. These number are rather confusing and ...

2 months ago

Solved

Draw matrix 'Swiss flag'( Euro 2020)

Draw a x-by-x matrix 'Swiss flag' using '1' and 0.(x is odd and bigger than 4) Example x=5 ans = [1 1 1 1 ...

2 months ago

Solved

Minimum jumps to reach end of the array

Given an array of integers where each element represents the max number of steps that can be made forward from that element. Ste...

2 months ago

Solved

Generate a matrix as follows

write a Function that gives like the following for a random n: n=2 ans= [ 0 1 1 0] n=6 ans= [ 0 ...

2 months ago

Solved

Draw a x-by-x matrix 'Denmark flag'(Euro(2020)

Draw a x-by-x matrix 'Denmark flag' using '4' and '1'.(x is odd and bigger than 4) Number 4: Caption S.Kjær and number 1: K.S...

2 months ago

Solved

Find numbers in the Popular Computing Z-sequence

Here’s a quick one. In 1977 the magazine Popular Computing sought “problem situations for which the computer is the best (if not...

2 months ago

Solved

List Honaker primes

The number 131 is the 32nd prime number. It is a Honaker prime because the sum of its digits (1+3+1) equals the sum of the digit...

2 months ago

Solved

Palindromic Prime

Palindromic Prime is a prime number that is also a palindromic number. (Wiki, OEIS) If given a monotonic series (increment=1) ...

2 months ago

Solved

Which Prime

Given two prime numbers, specify the relation between them i.e. - 'Twin Prime', 'Cousin Prime', 'Sexy Prime' or 'None'

2 months ago

Solved

Hoax Numbers

A Hoax Number (OEIS A019506) is defined as a composite number, whose sum of digits is equal to the sum of digits of its distinct...

2 months ago

Solved

Bessel Polynomials

Return the n-th Bessel polynomial Assume that n is a non-negative finite integer. bessel_poly(0) ans = 1 bessel_poly(1) ...

2 months ago

Solved

Draw 'S'

draw S using nxn matrix, where n is odd and greater than 4 S = [1 1 1 1 1 1 0 0 0 0 1 1 1 1 1 0 0 0 0 1 ...

2 months ago

Solved

Calculate the average value of the elements in the array

Calculate the average value of the elements in the array

3 months ago

Solved

Archimedes principle

According to Archimedes principle, the buoyancy force is equal to the weight of fluid displaced by the submerged portion of an o...

4 months ago

Solved

Performance - summation

Given a vector of natural numbers x = [1,2,3,...,N] compute the sum of its elements by not stressing the machine too much...

4 months ago

Solved

surface areas of a cylinder

There are 3 inputs: option, radius and height. If option= '1', compute the lateral surface area of the cylinder, for option 2 ca...

4 months ago

Solved

Acidity of vinegar and salts

Assuming: pH (potentia hydrogenii) = - log10(H+ ionic concentration in mol/Liter). For a buffer solution containing acetic acid ...

4 months ago

Solved

Feeling lucky?

Guess which number Cody is thinking (1 to 10)? (This is a game of luck more than skill. Good luck!)

4 months ago