Solved


Number of Flip Flop required in ripple counter
Find the number of flip flop required in ripple counter. If modulus of counter (N) is given find outnumber of Flip Flop (n) r...

10 years ago

Solved


How many days does the cat take to climb out of the hole?
A cat accidentally falls down a hole with sloping but rough sides. It can climb out of the hole of height h metres, but for ever...

10 years ago

Solved


Evaluate Polynomial
Given a polynomial equation coefficients in a vector p, you have to return its value at x. Example: For inputs p and x ...

10 years ago

Solved


Solve Linear equations
Solve Linear equations Example: x+y=2 and x+2y=3, then x and y equal to 1.

10 years ago

Solved


Determine the Anti-diagonal of a Magic Square
Determine the anti-diagonal (crossing from top right to lower left) of a magic square of size n. Examples If n = 3 y =...

10 years ago

Solved


find out eigenvector of matrix
find out eigenvector of matrix A =eye(3); Answer is [0 0 1; 0 1 0; 1 0 0];

10 years ago

Solved


Gamma Function
Evaluate the <http://en.wikipedia.org/wiki/Gamma_function/ Gamma Function>. Gamma_val(0) = Inf Gamma_val(1.2) = 0.9182

10 years ago

Solved


Television Screen Dimensions
Given a width to height ratio of a TV screen given as _w_ and _h_ as well as the diagonal length of the television _l_, return t...

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

10 years ago

Solved


Accessing elements on the diagonal
Access the diagonal elements of a matrix without 'diag' function

10 years ago

Solved


Similar Triangles - find the height of the tree
Given the height, h1, of a power pole, shorter than a tree, a given distance, x2 away, please find h2, height of the tree. Pleas...

10 years ago

Solved


Calculate the height of an object dropped from the sky
Assume that an object is dropped from 1000 meters above the surface of the earth at time t=0. The object is dropped such that t...

10 years ago

Solved


Procrustean bed
Given a vector x and an integer n, convert x to a vector of length n by (1) chopping off the end if it is too long, or (2) addin...

10 years ago

Solved


Rosenbrock's Banana Function and its derivatives
Write a function to return the value of <http://en.wikipedia.org/wiki/Rosenbrock_function Rosenbrock's two-dimensional banana fu...

10 years ago

Solved


Simple return on investment
Assume you have some money and want to invest all your money to stock market. You randomly select a stock and invest all your mo...

10 years ago

Solved


Largest Twin Primes
<http://en.wikipedia.org/wiki/Twin_prime Twin primes> are primes p1, p2 = p1 + 2 such that both p1 and p2 are prime numbers. Giv...

10 years ago

Solved


Angle of triangle
For three unknown points a b c, given three sides ab bc ca, find three angles abc bca cab in radians. Your function should b...

10 years ago

Solved


Make a simplified barcode
Given an integer to encode, make a barcode using the following encoding scheme: * The bar code is made from the binary versio...

10 years ago

Solved


Replace all zeros and NaNs in a matrix with the string 'error'
Given a numeric input matrix A, possibly containing some zero values and some NaNs, replace any occurrences of zero or NaN with ...

10 years ago

Solved


Find out value of polynomial at different value.
Find out value of polynomial at different value. Example p(s) = s + 8 For s=0, value is 8.

10 years ago

Solved


If-then-else
Complete the function below such that if the value of x is in the range 10 to 14, inclusive, the value 18 is assigned to y. Oth...

10 years ago

Solved


Generate Square Wave
Generate a square wave of desired length, number of complete cycles and duty cycle. Here, duty cycle is defined as the fraction ...

10 years ago

Solved


Vectorizing, too easy or too hard?
Please insert a . before any ^, * or / in the string. That's it!!

10 years ago

Solved


Calculate distance travelled when given radius and rotations
When given radius of wheel and number of rotations calculate total distance travelled consider pi=3.14

10 years ago

Solved


index of n in magic(n)
let input=5; magic matrix 17 24 1 8 15 23 5 7 14 16 4 6 13 20 22 ...

10 years ago

Solved


Pascal's Matrix
Given an integer n &ge; 0, generate the ( _n_+1) &times; ( _n_+1) lower triangular <http://en.wikipedia.org/wiki/Pascal_matrix P...

10 years ago

Solved


Community Problem 500!
In honor of this being the 500th Community problem, see if you can create a function that has a Cody size of 500. It can do any...

10 years ago

Solved


Tiling a matrix
Given a matrix and a number of columns, replicate matrix in a single row

10 years ago

Solved


Find the maximum two numbers of every column of a matrix
Find the maximum two numbers of every column of a matrix. Example: If we input a matrix A = [ 1 2 4 6 0 3 ...

10 years ago

Solved


Basics: Divide integers to get integer outputs in all cases
Divide integers a and b in such a way that output y is always an integer (in ceil manner)

10 years ago

Load more