Gelöst


Is this triangle right-angled?
Given any three positive numbers a, b, c, return true if the triangle with sides a, b and c is right-angled. Otherwise, return f...

etwa 10 Jahre vor

Gelöst


Side of a rhombus
If a rhombus has diagonals of length x and x+1, then what is the length of its side, y? <<http://upload.wikimedia.org/wikipe...

etwa 10 Jahre vor

Gelöst


Stuff the Board
You have a stack of tiles to put onto an array-like playing board. Each tile has a number (always an integer), and the board var...

etwa 10 Jahre vor

Gelöst


Scoring for oriented dominoes
Given a list of ordered pairs, and the order they should be placed in a line, find the sum of the absolute values of the differe...

etwa 10 Jahre vor

Gelöst


Area of an equilateral triangle
Calculate the area of an equilateral triangle of side x. <<http://upload.wikimedia.org/wikipedia/commons/e/e0/Equilateral-tr...

etwa 10 Jahre vor

Gelöst


Side of an equilateral triangle
If an equilateral triangle has area A, then what is the length of each of its sides, x? <<http://upload.wikimedia.org/wikipe...

etwa 10 Jahre vor

Gelöst


calculate linear convolution two vectors
for e.g in: a = [1 2 3] b = [4 5 6] out: y = [4 13 28 27 18]

etwa 10 Jahre vor

Gelöst


Calculate the integral of the polynomial
for e.g. in = [3 2 1] out = [1 1 1 0]

etwa 10 Jahre vor

Gelöst


Love triangles
Given a vector of lengths [a b c], determines whether a triangle with non-zero area (in two-dimensional Euclidean space, smarty!...

etwa 10 Jahre vor

Gelöst


Find a Pythagorean triple
Given four different positive numbers, a, b, c and d, provided in increasing order: a < b < c < d, find if any three of them com...

etwa 10 Jahre vor

Gelöst


Is this triangle right-angled?
Given three positive numbers a, b, c, where c is the largest number, return *true* if the triangle with sides a, b and c is righ...

etwa 10 Jahre vor

Gelöst


Create an 'arrow-head" matrix
Write a function that when given an odd number, produces an arrow-head function pointing to the right. Examples n = 3 ...

etwa 10 Jahre vor

Gelöst


Nearest Numbers
Given a row vector of numbers, find the indices of the two nearest numbers. Examples: [index1 index2] = nearestNumbers([2 5 3...

etwa 10 Jahre vor

Gelöst


Simple equation: Annual salary
Given an hourly wage, compute an annual salary by multiplying the wage times 40 and times 50, because salary = wage x 40 hours/w...

etwa 10 Jahre vor

Gelöst


Extract leading non-zero digit
<http://en.wikipedia.org/wiki/Benford%27s_law Benford's Law> states that the distribution of leading digits is not random. This...

etwa 10 Jahre vor

Gelöst


Back to basics 22 - Rotate a matrix
Covering some basic topics I haven't seen elsewhere on Cody. Rotate the input matrix 90 degrees counterclockwise (e.g. [1 2; ...

etwa 10 Jahre vor

Gelöst


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

etwa 10 Jahre vor

Gelöst


Linear system solve
Solve a linear set of equations as described in the following link: http://www.people.virginia.edu/~teh1m/cody/linsolv1.pdf

etwa 10 Jahre vor

Gelöst


Possible Opponents Matrix for single-elimination tournament
It's tournament time! Given a single-elimination tournament with 2^N competitors, compute the 2^N by 2^N matrix M such that M...

etwa 10 Jahre vor

Gelöst


inner product of two vectors
inner product of two vectors

etwa 10 Jahre vor

Gelöst


Order of things - 2
This problem is closely related to <http://www.mathworks.nl/matlabcentral/cody/problems/2189-order-of-things-1 Problem 2189, Ord...

etwa 10 Jahre vor

Gelöst


Order of things - 1
Let's assume you have a number of calculations to perform, that depend on each other. E.g. 'A' can be calculated, once the outco...

etwa 10 Jahre vor

Gelöst


Counting Money
Add the numbers given in the cell array of strings. The strings represent amounts of money using this notation: $99,999.99. E...

etwa 10 Jahre vor

Gelöst


Create a two dimensional zero matrix
You have to create a zero matrix of size (mxn) whose inputs are m and n and the elements of your matrix should be zeros. Exam...

etwa 10 Jahre vor

Gelöst


Say something funny
Say something funny, or not. Your solution will be (fully automatically and objectively) scored based on how clever or funny ...

etwa 10 Jahre vor

Gelöst


Check if number exists in vector
Return 1 if number _a_ exists in vector _b_ otherwise return 0. a = 3; b = [1,2,4]; Returns 0. a = 3; b = [1,...

etwa 10 Jahre vor

Gelöst


Target sorting
Sort the given list of numbers |a| according to how far away each element is from the target value |t|. The result should return...

etwa 10 Jahre vor

Gelöst


Back to basics 15 - classes
Covering some basic topics I haven't seen elsewhere on Cody. Return the class of the input variable.

etwa 10 Jahre vor

Gelöst


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

etwa 10 Jahre vor

Gelöst


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

etwa 10 Jahre vor

Mehr laden