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


It's race time! Write a faster function than the test suite call of unique().
Write a function to get unique elements of a vector faster than unique()! Input will be a vector (of integers or floating point ...

etwa 11 Jahre vor

Gelöst


Is the Point in a Circle?
Check whether a point or multiple points is/are in a circle centered at point (x0, y0) with radius r. Points = [x, y]; c...

etwa 11 Jahre vor

Gelöst


Create a vector whose elements depend on the previous element
The idea is to create a vector A whose elements depend on the previous element : *A(i+1) = 2*A(i)+1* *2 Inputs*: - A : The...

etwa 11 Jahre vor

Gelöst


Sum the entries of each column of a matrix which satisfy a logical condition.
Given a numeric matrix A and a logical array L of the same size as A, return a row vector S containing the columnwise sums of th...

etwa 11 Jahre vor

Gelöst


Einsteinium-253 decay
Radioactive Einsteinium-253 has a half-life of 1,768,608 seconds. Given 1000mg of Einsteinium-253 at t=0 days, how much is lef...

etwa 11 Jahre vor

Gelöst


newRMS
find root mean square of a signal x in less time than the test code and accurate to six places.

etwa 11 Jahre vor

Gelöst


More luck than brains
Give a random function that guess and return numbers from 1 to 6 exactly like the test suite .

etwa 11 Jahre vor

Gelöst


letter yes yes & letter no no
Split a string into two strings, first string has all alphabetic letters, next string has all the rest, keep the order please, o...

etwa 11 Jahre vor

Gelöst


Basics: 'Find the eigenvalues of given matrix
Find the eigenvalues y for a given matrix x.

etwa 11 Jahre vor

Gelöst


Sort numbers by outside digits
Sort the array so that they are sorted as if their value was a 5 digit number made from the first three and last two digits of t...

etwa 11 Jahre vor

Gelöst


Remove from a 2-D matrix all the rows that contain at least one element less than or equal to 4
Example: in = magic(5) in = 17 24 1 8 15 23 5 7 14 16 4 6 13 20 ...

etwa 11 Jahre vor

Gelöst


Insert zeros into vector
Insert zeros after each elements in the vector. Number of zeros is specified as the input parameter. For example: x = [1 ...

etwa 11 Jahre vor

Gelöst


What's Your BMI?
Find the body mass index. For reference, please refer to Wikipedia here: <http://en.wikipedia.org/wiki/Body_mass_index body ...

etwa 11 Jahre vor

Gelöst


Reverse the elements of an array
Reverse the order of elements in an array: eg: input X = [ 1 2 3 ; 4 5 6 ; 7 8 9 ] o...

etwa 11 Jahre vor

Gelöst


Replace multiples of 5 with NaN
It is required to replace all values in a vector that are multiples of 5 with NaN. Example: input: x = [1 2 5 12 10 7] ...

etwa 11 Jahre vor

Gelöst


Simple Decoder Ring
The stereotypical _decoder ring_ is remembered as a cereal box prize from the 1950s. Kids learned about cryptography by startin...

etwa 11 Jahre vor

Gelöst


Cody Computer Part 4 : Are you a morning Cody player Addicted ?
This is a stupid Cody challenge. You just have to *click "Submit" between 7 and 9 AM.* ... Greenwich Mean Time (GMT). To see ...

etwa 11 Jahre vor

Gelöst


does it touch ?
given a sentence, tell how much it touches. input : string output : how much it touches touching : a bilabial phoneme d...

etwa 11 Jahre vor

Gelöst


7 segment LED display
Given a whole number, output how many segments would be lit up to display it on a 7 segment LED display (http://en.wikipedia.org...

etwa 11 Jahre vor

Gelöst


System of equations
Find a solution to a system of equations represented by a |n| by |n+1| matrix. For instance, [ 2 0 4; => 2*x = 4 ...

etwa 11 Jahre vor

Gelöst


The Answer to Life, the Universe, and Everything
A variation of a previous Hitchhiker's Guide to the Galaxy problem. *Inputs:* Life, the Universe, and Everything *Output:*...

etwa 11 Jahre vor

Gelöst


Convert from Base 10 to base 5
Convert the input number from base 10 into base 5: for example: if a(in base 10)= 5 then a(in base 5)= 10

etwa 11 Jahre vor

Gelöst


Find indices of multiple minima in a vector
I have a vector, say: x= [ 1 5 6 2 6 1 3 5 1] Now I would like to get the index of the minimum values in this vector. When...

etwa 11 Jahre vor

Gelöst


Replicate elements in vectors
Replicate each element of a row vector (with NaN) a constant number of times. Examples : n=2, A=[1 2 3] -> [1 1 2 2 3 3] n=0...

etwa 11 Jahre vor

Gelöst


Set defaults
Write a function that computes the volume of a cube. The function should be able to accept three inputs: the length, width, and...

etwa 11 Jahre vor

Gelöst


sum of non-primes
The sum of the non-primes below 10 is 1+4+6+8+9+10=38 Find the sum of all the non-primes below the input, N.

etwa 11 Jahre vor

Gelöst


Back to basics 18 - justification
Covering some basic topics I haven't seen elsewhere on Cody. Given a string with extra spaces in front and/or in back, return...

etwa 11 Jahre vor

Gelöst


Fill a zeros matrix
The aim is to fill an array of all zeros given a numerical value and the index of row and columns for this value. 3 Inputs: ...

etwa 11 Jahre vor

Gelöst


Find max
Find the maximum value of a given vector or matrix.

etwa 11 Jahre vor

Mehr laden