A résolu


Babylonian method
Calculate the square root of a given positive number a using the Babylonian method (https://en.wikipedia.org/wiki/Methods_of_co...

environ 10 ans il y a

A résolu


Polygon division
Given the number of vertices (or sides), n, of a planar convex polygon, return the number of ways, w, in which you can divide th...

environ 10 ans il y a

A résolu


jumping astronauts
The surface gravity on the moon is approximately 2 m/s^2. Thats why an funny astronauts feels as light as a feather and jumps fr...

environ 10 ans il y a

A résolu


attenuation
A beam of X-rays propagates a length d(1) through a medium with an attenuation coefficient alpha(1). After that the beam propaga...

environ 10 ans il y a

A résolu


center of mass
R is a given matrix with size [n,2]. R(i,:) is interpreted as the 2D-position of a mass point with mass i. Calculate the center ...

environ 10 ans il y a

A résolu


Concatenate a successive power matrix in a column matrix
Generate F = [M1 M^2 ... M^p] with M a matrix, without using for.

environ 10 ans il y a

A résolu


Coin Tossing: Probability of Same Heads for N tosses
A pair of physicists toss a coin n times each. What is the probability that they tossed the same number of heads? *Input:*...

environ 10 ans il y a

A résolu


Evaluating continued fractions
Given row vector c=[c0 c1 c2 c3 ...] evaluate the continued fraction x=c0+1/(c1+1/(c2+1/(c3+...))) If c is a ...

environ 10 ans il y a

A résolu


Mimic foldl in functional programming
Mimic the higher-order function |foldl| ( <http://en.wikipedia.org/wiki/Fold_%28higher-order_function%29 Wikipedia:Fold (higher-...

environ 10 ans il y a

A résolu


Create incremental spiral WITHOUT USING EVAL or FEVAL
Constructions that use feval or eval are used to cheat with cody. This test-suite tries to avoid that trick. The goal of this...

environ 10 ans il y a

A résolu


Put two time series onto the same time basis
Use interpolation to align two time series onto the same time vector. This is a problem that comes up in <http://www.mathwork...

environ 10 ans il y a

A résolu


The Birthday Phenomenon
First off, leap years are not being considered for this. In fact the year that people are born shouldn't be taken into considera...

environ 10 ans il y a

A résolu


Pipeline
Do something that makes x> f1 > f2 ... > fn equal to fn(...f2(f1(x))...) * x : MATLAB object * fi: function handle ...

environ 10 ans il y a

A résolu


Unique dice configurations
Given a number of dice N and the number of sides on each die S, write a MATLAB function that will output how many unique permuta...

environ 10 ans il y a

A résolu


Dice roll - lateral faces
For this problem, you will be provided with the values of a dice roll (regular six-sided dice). The number of dice will be at le...

environ 10 ans il y a

A résolu


Dice roll - opposite faces
For this problem, you will be provided with the values of a dice roll (regular six-sided dice). The number of dice will be at le...

environ 10 ans il y a

A résolu


Sorting integers by their digits (Level 4)
This is the next step up from <http://www.mathworks.com/matlabcentral/cody/problems/42815-sorting-integers-by-their-digits-level...

environ 10 ans il y a

A résolu


Sorting integers by their digits (Level 3)
This is the next step up from <http://www.mathworks.com/matlabcentral/cody/problems/42811-sorting-integers-by-their-digits-level...

environ 10 ans il y a

A résolu


The Dark Side of the Die
It is well-known that opposite sides of a classic hexahedral die add to 7. Given a vector of dice rolls, calculate the sum of th...

environ 10 ans il y a

A résolu


Sorting integers by their digits (Level 2)
This is the next step up from <http://www.mathworks.com/matlabcentral/cody/problems/42809-sorting-integers-by-their-digits Probl...

environ 10 ans il y a

A résolu


Convert String to Morse Code
Convert a given string to international <http://en.wikipedia.org/wiki/Morse_code Morse Code> * Strings will only have [A-z], ...

environ 10 ans il y a

A résolu


Sorting integers by their digits
Given a vector, v, of positive integers, return a vector, w, by sorting v in ascending order, such that primary sorting is done ...

environ 10 ans il y a

A résolu


Return the Nth Output from an Input Command
*Description* Given _F_, a cell array whose first element is a function handle and subsequent elements are arguments, return ...

environ 10 ans il y a

A résolu


GJam March 2016 IOW: Clock Dance
This Challenge is derived from <http://code.google.com/codejam/contest/8274486/dashboard#s=p1 GJam March 2016 Annual I/O for Wom...

environ 10 ans il y a

A résolu


Sum of Logarithms
Given a vector, v, of real positive numbers, compute the sum, s, of the base-10 logarithms of the elements of v, without the use...

environ 10 ans il y a

A résolu


GJam 2016 Rd1A: Rank and File (Large)
This Challenge is derived from <http://code.google.com/codejam/contest/4304486/dashboard#s=p1 GJam Rd1A 2016 Rank and File>. Thi...

environ 10 ans il y a

A résolu


GJam 2016 Rd1A: Rank and File (small)
This Challenge is derived from <http://code.google.com/codejam/contest/4304486/dashboard#s=p1 GJam Rd1A 2016 Rank and File>. Thi...

environ 10 ans il y a

A résolu


Approximate e
Given a and n, compute and approximation to f = a * e ^ n, without the use of exp, string operations, or floating point numbers....

environ 10 ans il y a

A résolu


function on a moving window
Create a function that applies an operation (such as @sum, @mean, @std, @norm etc) to a moving window of the data. First exam...

environ 10 ans il y a

A résolu


Britney Unfolded
You have a long, narrow strip of paper. You are going to fold this strip of paper length-wise in half, than fold the folded stri...

environ 10 ans il y a

Charger plus