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

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

11 mesi ago

Solved

Solve a System of Linear Equations

*Example*: If a system of linear equations in _x₁_ and _x₂_ is: 2 _x₁_ + _x₂_ = 2 _x₁...

11 mesi 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,....

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

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

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

11 mesi ago

Solved

Times 2 - START HERE

Try out this test problem first. Given the variable x as your input, multiply it by two and put the result in y. Examples:...

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

11 mesi ago

Solved

Alternating sum

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

11 mesi ago

Solved

Is X a Fibonacci Matrix?

In honor of Cleve's new blog and post: <http://blogs.mathworks.com/cleve/2012/06/03/fibonacci-matrices/> Is X a Fibonacci ...

11 mesi ago

Solved

"Look and say" sequence

What's the next number in this sequence? * [0] * [1 0] * [1 1 1 0] * [3 1 1 0] * [1 3 2 1 1 0] This a variant on the w...

11 mesi ago

Solved

Return the Fibonacci Sequence

Write a code which returns the Fibonacci Sequence such that the largest value in the sequence is less than the input integer N. ...

11 mesi ago

Solved

Sum the Infinite Series

Given that 0 < x and x < 2*pi where x is in radians, write a function [c,s] = infinite_series(x); that returns with the...

11 mesi ago

Solved

Sum of first n terms of a harmonic progression

Given inputs a, d and n, return the sum of the first n terms of the harmonic progression a, a/(1+d), a/(1+2d), a/(1+3d),....

11 mesi ago

Solved

Project Euler: Problem 10, Sum of Primes

The sum of the primes below 10 is 2 + 3 + 5 + 7 = 17. Find the sum of all the primes below the input, N. Thank you <http:/...

11 mesi ago

Solved

Project Euler: Problem 9, Pythagorean numbers

A Pythagorean triplet is a set of three natural numbers, a b c, for which, a^2 + b^2 = c^2 For example, 3^2 + 4^2 =...

11 mesi ago

Solved

Project Euler: Problem 8, Find largest product in a large string of numbers

Find the greatest product of five consecutive digits in an n-digit number. 73167176531330624919225119674426574742355349194934...

11 mesi ago

Solved

Project Euler: Problem 7, Nth prime

By listing the first six prime numbers: 2, 3, 5, 7, 11, and 13, we can see that the 6th prime is 13. What is the Nth prime nu...

11 mesi ago

Solved

Project Euler: Problem 6, Natural numbers, squares and sums.

The sum of the squares of the first ten natural numbers is, 1^2 + 2^2 + ... + 10^2 = 385 The square of the sum of the first ...

11 mesi ago

Solved

Project Euler: Problem 5, Smallest multiple

2520 is the smallest number that can be divided by each of the numbers from 1 to 10 without any remainder. What is the smalle...

11 mesi ago

Solved

Project Euler: Problem 4, Palindromic numbers

A palindromic number reads the same both ways. The largest palindrome made from the product of two 2-digit numbers is 9009 = 91 ...

11 mesi ago

Solved

Project Euler: Problem 3, Largest prime factor

The prime factors of 13195 are 5, 7, 13 and 29. What is the largest prime factor of the number being input, input might be ui...

11 mesi ago

Solved

Project Euler: Problem 2, Sum of even Fibonacci

Each new term in the Fibonacci sequence is generated by adding the previous two terms. By starting with 1 and 2, the first 10 te...

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

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

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

11 mesi ago

Solved

Roll the Dice!

*Description* Return two random integers between 1 and 6, inclusive, to simulate rolling 2 dice. *Example* [x1,x2] =...

11 mesi ago

Solved

Number of 1s in a binary string

Find the number of 1s in the given binary string. Example. If the input string is '1100101', the output is 4. If the input stri...

11 mesi ago

Solved

Return the first and last character of a string

Return the first and last character of a string, concatenated together. If there is only one character in the string, the functi...

11 mesi ago