Solved


Geometric series
Find the sum, given the first term t1, the common ratio r, and number of terms n. Examples If input t1=1, r=1, n=7 the...

ongeveer 12 jaar ago

Solved


Remove the air bubbles
Given a matrix a, return a matrix b in which all the zeros have "bubbled" to the top. That is, any zeros in a given column shoul...

ongeveer 12 jaar ago

Solved


High school cafeteria
Given an input vector of positive integers, return a row vector with the primes first (in increasing order) and the composites n...

ongeveer 12 jaar 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:/...

ongeveer 12 jaar 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...

ongeveer 12 jaar ago

Solved


Which quadrant?
Given a complex number, output quadrant 'I' 'II' 'III' or 'IV' | II | I | ...

ongeveer 12 jaar ago

Solved


Nearest
*Description* Find the value and index of the element in vector _x_ that is nearest to value _y_. _y_ should be able to be a ...

ongeveer 12 jaar ago

Solved


Least common multiple of many numbers
1:6 -> 60

ongeveer 12 jaar ago

Solved


Check to see if a Sudoku Puzzle is Solved
*Description:* Your task, should you choose to accept it, is to make a function that checks to see if a 9x9 matrix of integer...

ongeveer 12 jaar 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...

ongeveer 12 jaar ago

Solved


Filter AC, pass DC
Input x is the sampled signal vector, may have both AC and DC components. Output vector y should not contain any AC component. ...

ongeveer 12 jaar ago

Solved


Distance walked 3D
suppose you go from x-y-z coordinates [3,4,2] to [0,0,2] to [0,1,2] to [1,1,2], to [1,1,20] then you walked 25 units of distance...

ongeveer 12 jaar ago

Solved


Remove NaN ?
input -> matrix (n*m) with at least one element equal to NaN; output -> matrix(p*m), the same matrix where we deleted the enti...

ongeveer 12 jaar ago

Solved


Right and wrong
Given a vector of lengths [a b c], determines whether a triangle with those sides lengths is a right triangle: <http://en.wikipe...

ongeveer 12 jaar ago

Solved


pressure to dB?
given x ratio of pressure, find corresponding y dB

ongeveer 12 jaar ago

Solved


So many choices
For inputs _n_ and _k_ (in that order), output the number of ways that k objects can be chosen from amongst n distinct objects. ...

ongeveer 12 jaar ago

Solved


Distance walked 2D
Suppose you go from x-y coordinates [3,4] to [0,0] to [0,1] to [1,1], then you walked 7 units of distance.

ongeveer 12 jaar ago

Solved


First N Perfect Squares
*Description* Return the first N perfect squares *Example* input = 4; output = [ 1 4 9 16 ];

ongeveer 12 jaar ago

Solved


All your base are belong to us
Find the base _b_ logarithm of the input decimal number _x_. Express the output as a decimal number. The first argument is the n...

ongeveer 12 jaar ago

Solved


give nth decimal place of pi
max 15th place after the decimal point is ok for now

ongeveer 12 jaar 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 ...

ongeveer 12 jaar ago

Solved


Solve the Sudoku Row
*Description* A simple yet tedious task occurs near the end of most Sudoku-solving algorithms, computerized or manual. The ta...

ongeveer 12 jaar ago

Solved


Tell me the slope
Tell me the slope, given a vector with horizontal run first and vertical rise next. Example input: x = [10 2];

ongeveer 12 jaar ago

Solved


Make one big string out of two smaller strings
If you have two small strings, like 'a' and 'b', return them put together like 'ab'. 'a' and 'b' => 'ab' For extra ...

ongeveer 12 jaar ago

Solved


Find the sum of the elements in the "second" diagonal
Find the sum of the elements in the diagonal that starts at the top-right corner and ends at the bottom-left corner.

ongeveer 12 jaar ago

Solved


Number of 1s in the Binary Representation of a Number
*Description* Return the number of 1s in the (unsigned integer) binary representation of a number. This function should be ab...

ongeveer 12 jaar ago

Solved


Bottles of beer
Given an input number representing the number of bottles of beer on the wall, output how many are left if you take one down and ...

ongeveer 12 jaar ago

Solved


Arrange Vector in descending order
If x=[0,3,4,2,1] then y=[4,3,2,1,0]

ongeveer 12 jaar ago

Solved


Program an exclusive OR operation with logical operators
Program an exclusive or operation *without* using the MATLAB function xor. Use logical operators like |, &, ~, ... instead. ...

ongeveer 12 jaar ago

Solved


Remove DC
Input x is the sampled signal vector, may have both AC and DC components. Output y should not contain any DC component. Examp...

ongeveer 12 jaar ago

Load more