Solved


Who invented zero?
We know the importance zero in computer science, mathematics... but who invented zero? Clue: He was the first in the line ...

mer än 11 år ago

Solved


kmph to mps
convert kilometer per hour to meter per second

mer än 11 år ago

Solved


Find state names that start with the letter N
Given a list of US states, remove all the states that start with the letter N. If s1 = 'Alabama Montana Nebraska Vermont Ne...

mer än 11 år ago

Solved


Counting Sequence
Given a vector x, find the "counting sequence" y. A counting sequence is formed by "counting" the entries in a given sequence...

mer än 11 år ago

Solved


select the primes of a vector
Find the prime numbers in a vector

mer än 11 år ago

Solved


Number of Circles in a Number
Given a number, return the number of closed 'circles' in the base 10 numerical representation. Note: the number 4 has no circ...

mer än 11 år ago

Solved


Find relatively common elements in matrix rows
You want to find all elements that exist in greater than 50% of the rows in the matrix. For example, given A = 1 2 3 5 ...

mer än 11 år ago

Solved


Periodic Table II 101.
Given the symbol of an element, return its atomic number. This is the continuation of <http://www.mathworks.com/matlabcentral/co...

mer än 11 år ago

Solved


James Bond film count
Twenty-three James Bond films have been produced, in the years 1962, 1963, 1964, 1965, 1967, 1969, 1971, 1973, ... 197...

mer än 11 år ago

Solved


Special matrix
Make a square matrix with this shape. For n=4 M = 1 1 0 0 1 0 1 0 0 1 0 ...

mer än 11 år ago

Solved


Altitude of locations on the earth
Find the altitude of a location on the earth, given latitude and longitude coordinates, above mean sea level. Input__________...

mer än 11 år ago

Solved


Back to basics 9 - Indexed References
Covering some basic topics I haven't seen elsewhere on Cody. Given an input matrix and row and column, output the index of th...

mer än 11 år ago

Solved


Remove the polynomials that have positive real elements of their roots.
The characteristic equation for a dynamic system is a polynomial whose roots indicate its behavior. If any of the <http://www.ma...

mer än 11 år ago

Solved


Tic Tac Toe FTW
Given a tic tac toe board: * 1 represents X * 0 represents empty. * -1 represents O It is X's move. If there is an imme...

mer än 11 år ago

Solved


Volume of a sphere given its surface area
You just measured its surface area, that is the input.

mer än 11 år ago

Solved


Get the length of a given vector
Given a vector x, the output y should equal the length of x.

mer än 11 år ago

Solved


Moving average (variable kernel length)
Find the moving average in a vector. The kernel length is a variable. For example x = 1:10 kernel_length = 2 would r...

mer än 11 år ago

Solved


Derivative of polynomial
Compute the derivative of a given polynomial. The input is an <http://www.mathworks.com/help/matlab/math/representing-polynomial...

mer än 11 år ago

Solved


CONVERT TAN TO SIN
In a right angle triangle ABC given the tan(A) then find sin(A) For example tan(A)=3/4 then sin(A)=3/5

mer än 11 år 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:/...

mer än 11 år ago

Solved


Alphabetize by last name
Given a list of names in a cell array, sort the list by the last name. So if list = {'Barney Google','Snuffy Smith','Dagwood ...

mer än 11 år ago

Solved


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

mer än 11 år ago

Solved


Counting in Finnish
Sort a vector of single digit whole numbers alphabetically by their name, in Finnish. See the Wikipedia page for <http://en.wik...

mer än 11 år ago

Solved


Find common elements in matrix rows
Given a matrix, find all elements that exist in every row. For example, given A = 1 2 3 5 9 2 5 9 3 2 5 9 ...

mer än 11 år ago

Solved


Calculate the Levenshtein distance between two strings
This problem description is lifted from <http://en.wikipedia.org/wiki/Levenshtein_distance>. The Levenshtein distance betwee...

mer än 11 år 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...

mer än 11 år 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...

mer än 11 år ago

Solved


Back to basics 1 - Saving
Covering some basic topics I haven't seen elsewhere on Cody. Given an input variable 'x', save it to disk in a file named 'co...

mer än 11 år ago

Solved


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

mer än 11 år 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. ...

mer än 11 år ago

Load more