Solved

nth Rational Number

Return the nth rational number. This is the inverse to Problem <http://www.mathworks.com/matlabcentral/cody/problems/1471 1...

2 meses ago

Solved

Generate a Parasitic Number

This problem is the next step up from <http://www.mathworks.com/matlabcentral/cody/problems/156-parasitic-numbers Problem 156>. ...

2 meses ago

Solved

Polygonal numbers

The task of <http://www.mathworks.co.uk/matlabcentral/cody/problems/5 Problem 5> is to calculate triangular numbers. By playing ...

2 meses ago

Solved

Polite numbers. N-th polite number.

A polite number is an integer that sums of at least two consecutive positive integers. For example _7 = 3+4_ so 7 is a polite...

2 meses ago

Solved

Combined Ages 3 - Non-symmetric, n ≥ 3

Pursuant to the previous two problems ( <http://www.mathworks.com/matlabcentral/cody/problems/42382-combined-ages-1-symmetric-n-...

2 meses ago

Solved

Combined Ages 4 - Non-symmetric with multiples, n ≥ 3

This problem is slightly more difficult than <http://www.mathworks.com/matlabcentral/cody/problems/42383-combined-ages-3-non-sym...

2 meses ago

Solved

Twist 'n' Match

Given n and m, construct an n-by-n matrix a such that a, when rotated 90 degrees and compared with itself, matches itself in exa...

2 meses ago

Solved

Split bread like the Pharaohs - Egyptian fractions and greedy algorithm

How would you split 5 loaves of bread among 8 people in all fairness? Get a hint from the Pharaohs. 5/8 = 4/8 + 1/8 , i.e. each ...

2 meses ago

Solved

Index one element in each vector of an array along a given dimension

Functions like min and max can return in their second output argument the index of the element in each vector along a particular...

2 meses ago

Solved

return row and column indices given 2 values which define a range

Inspired by problem <http://www.mathworks.co.kr/matlabcentral/cody/problems/856-getting-the-indices-from-a-matrice> Inputs: - ...

2 meses ago

Solved

Three...is a magic number.

Yes it is... It's a magic number... To help you get rid of that earworm, here's a new Cody problem. You are given a squar...

2 meses ago