해결됨

Implement simple rotation cypher

If given a letter from the set: [abc...xyz] and a shift, implement a shift cypher. Example: 'abc' with a shi...

4달 전

해결됨

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

4달 전

해결됨

Get all prime factors

List the prime factors for the input number, in decreasing order. List each factor. If the prime factor occurs twice, list it as...

4달 전

해결됨

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

4달 전

해결됨

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

4달 전

해결됨

Create times-tables

At one time or another, we all had to memorize boring times tables. 5 times 5 is 25. 5 times 6 is 30. 12 times 12 is way more th...

4달 전

해결됨

Swap the input arguments

Write a two-input, two-output function that swaps its two input arguments. For example: [q,r] = swap(5,10) returns q = ...

4달 전

해결됨

Return the first and last characters of a character array

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

4달 전

해결됨

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

4달 전

해결됨

Pi Digit Probability

Assume that the next digit of pi constant is determined by the historical digit distribution. What is the probability of next di...

4달 전

해결됨

Given a square and a circle, please decide whether the square covers more area.

You know the side of a square and the diameter of a circle, please decide whether the square covers more area.

4달 전

해결됨

Pi Estimate 1

Estimate Pi as described in the following link: <http://www.people.virginia.edu/~teh1m/cody/Pi_estimation1.pdf>

4달 전

해결됨

Calculate area of sector

A=function(r,seta) r is radius of sector, seta is angle of sector, and A is its area. Area of sector A is defined as 0.5*(r^2...

4달 전

해결됨

Pizza!

Given a circular pizza with radius _z_ and thickness _a_, return the pizza's volume. [ _z_ is first input argument.] Non-scor...

4달 전

해결됨

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

4달 전

해결됨

Electrical Diode Current Calculation

In engineering, there is not always a single equation that describes a phenomenon accurately enough to be applied in all instanc...

4달 전

해결됨

An Ohm's Law Calculator

*BACKGROUND / MOTIVATION:* Many important observations in math and science can be described by short, but powerful, equations...

4달 전

해결됨

Doubling elements in a vector

Given the vector A, return B in which all numbers in A are doubling. So for: A = [ 1 5 8 ] then B = [ 1 1 5 ...

4달 전

해결됨

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

4달 전

해결됨

Make a run-length companion vector

Given a vector x, return a vector r that indicates the run length of any value in x. Each element in r shows how many times the ...

4달 전

해결됨

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

4달 전

해결됨

Calculate a Damped Sinusoid

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

4달 전

해결됨

Calculate Inner Product

Given two input matrices, |x| and |y|, check if their inner dimensions match. * If they match, create an output variable |z|...

4달 전

해결됨

Solve a System of Linear Equations

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

4달 전