Solved

Calculate BMI

Given a matrix |hw| (height and weight) with two columns, calculate BMI using these formulas: * 1 kilogram = 2.2 pounds * 1 ...

nästan 4 år ago

Solved

Plot Damped Sinusoid

Given two vectors |t| and |y|, make a plot containing a blue ( |b| ) dashed ( |--| ) line of |y| versus |t|. Mark the minimum...

nästan 4 år ago

Solved

Calculate a Damped Sinusoid

The equation of a damped sinusoid can be written as |y = A.ⅇ^(-λt)*cos(2πft)| where |A|, |λ|, and |f| ...

nästan 4 år ago

Solved

Verify Law of Large Numbers

If a large number of fair N-sided dice are rolled, the average of the simulated rolls is likely to be close to the mean of 1,2,....

nästan 4 år ago

Solved

Find the Oldest Person in a Room

Given two input vectors: * |name| - user last names * |age| - corresponding age of the person Return the name of the ol...

nästan 4 år ago

Solved

Convert from Fahrenheit to Celsius

Given an input vector |F| containing temperature values in Fahrenheit, return an output vector |C| that contains the values in C...

nästan 4 år ago

Solved

Calculate Amount of Cake Frosting

Given two input variables |r| and |h|, which stand for the radius and height of a cake, calculate the surface area of the cake y...

nästan 4 år ago

Solved

Proper Factors

Generate the proper factors of input integer _x_ and return them in ascending order. For more information on proper factors, ref...

nästan 4 år ago

Solved

Multiples of a Number in a Given Range

Given an integer factor _f_ and a range defined by _xlow_ and _xhigh_ inclusive, return a vector of the multiples of _f_ that fa...

nästan 4 år ago

Solved

Smith numbers

Return true if the input is a Smith number in base ten. Otherwise, return false. Read about Smith numbers at <http://en.wikipedi...

nästan 4 år ago

Solved

There are 10 types of people in the world

Those who know binary, and those who don't. The number 2015 is a palindrome in binary (11111011111 to be exact) Given a year...

nästan 4 år ago

Solved

Converting binary to decimals

Convert binary to decimals. Example: 010111 = 23. 110000 = 48.

nästan 4 år ago

Solved

Binary code (array)

Write a function which calculates the binary code of a number 'n' and gives the result as an array(vector). Example: Inpu...

nästan 4 år ago

Solved

Relative ratio of "1" in binary number

Input(n) is positive integer number Output(r) is (number of "1" in binary input) / (number of bits). Example: * n=0; r=...

nästan 4 år ago

Solved

Bit Reversal

Given an unsigned integer _x_, convert it to binary with _n_ bits, reverse the order of the bits, and convert it back to an inte...

nästan 4 år ago

Solved

Given an unsigned integer x, find the largest y by rearranging the bits in x

Given an unsigned integer x, find the largest y by rearranging the bits in x. Example: Input x = 10 Output y is 12 ...

nästan 4 år ago

Solved

Find out sum and carry of Binary adder

Find out sum and carry of a binary adder if previous carry is given with two bits (x and y) for addition. Examples Previo...

nästan 4 år ago

Solved

Convert given decimal number to binary number.

Convert given decimal number to binary number. Example x=10, then answer must be 1010.

nästan 4 år ago

Solved

Return fibonacci sequence do not use loop and condition

Calculate the nth Fibonacci number. Given n, return f where f = fib(n) and f(1) = 1, f(2) = 1, f(3) = 2, ... Examples: ...

nästan 4 år ago

Solved

Find the next Fibonacci number

In the sequence of Fibonacci numbers, every number is the sum of the two preceding ones: 1, 1, 2, 3, 5, 8, 13, 21, 34, 55...

nästan 4 år ago

Solved

(Linear) Recurrence Equations - Generalised Fibonacci-like sequences

This problem is inspired by problems <http://uk.mathworks.com/matlabcentral/cody/problems/2187-generalized-fibonacci 2187>, <htt...

nästan 4 år ago

Solved

Fibonacci Decomposition

Every positive integer has a unique decomposition into nonconsecutive Fibonacci numbers f1+f2+ ... Given a positive integer n, r...

nästan 4 år ago

Solved

How many Fibonacci numbers?

Find the number of unique Fibonacci numbers (don't count repeats) in a vector of positive integers. Example: x = [1 2 3 4...

nästan 4 år 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...

nästan 4 år ago

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

nästan 4 år 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)...

nästan 4 år ago

Solved

Integer Sequence - II : New Fibonacci

Crack the following Integer Sequence. (Hints : It has been obtained from original Fibonacci Sequence and all the terms are also ...

nästan 4 år ago

Solved

Integer sequence - 2 : Kolakoski sequence

Get the n-th term of <https://oeis.org/A000002 Kolakoski Sequence>.

nästan 4 år ago

Solved

Alternating sum

Given vector x, calculate the alternating sum y = x(1) - x(2) + x(3) - x(4) + ...

nästan 4 år ago

Solved

Golomb's self-describing sequence (based on Euler 341)

The Golomb's self-describing sequence {G(n)} is the only nondecreasing sequence of natural numbers such that n appears exactly G...

nästan 4 år ago