Risolto


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

11 mesi fa

Risolto


Combined Ages 2 - Symmetric, n ≥ 3
Following on <http://www.mathworks.com/matlabcentral/cody/problems/42382-combined-ages-1-symmetric-n-3 Combined Ages 2>, you wil...

11 mesi fa

Risolto


Combined Ages 1 - Symmetric, n = 3
You have probably seen the common riddle wherein combined ages are provided and you must determine the individual ages. For exam...

11 mesi fa

Risolto


Linear system of equations
Solve the system of equations in three variables.

11 mesi fa

Risolto


Pernicious Anniversary Problem
Since Cody is 5 years old, it's pernicious. A <http://rosettacode.org/wiki/Pernicious_numbers Pernicious number> is an integer w...

11 mesi fa

Risolto


Goldbach's marginal conjecture - Write integer as sum of three primes
Goldbach's strong conjecture states that every even integer greater than 2 can be expressed as the sum of two primes. For exampl...

11 mesi fa

Risolto


The Goldbach Conjecture, Part 2
The <http://en.wikipedia.org/wiki/Goldbach's_conjecture Goldbach conjecture> asserts that every even integer greater than 2 can ...

11 mesi fa

Risolto


Twins in a Window
<http://en.wikipedia.org/wiki/Twin_primes Twin primes> are prime numbers that differ by 2, such as [11,13] or [41,43]. Write a f...

11 mesi fa

Risolto


Twin Primes
Twin primes are pairs of primes that are immediately next to each other (difference of two). The lesser of twin primes are 3, 5,...

11 mesi fa

Risolto


Extra safe primes
Did you know that the number 5 is the first safe prime? A safe prime is a prime number that can be expressed as 2p+1, where p is...

11 mesi fa

Risolto


Factorize THIS, buddy
List the prime factors for the input number, in decreasing order. List each factor only once, even if the factorization includes...

11 mesi fa

Risolto


Generalised Hamming Number
Inspired by Project Euler n°204 and Problem 1308 by James A generalised Hamming number of type n, has no prime factor larger ...

11 mesi fa

Risolto


Multiples of a Number in a Given Range
Given an integer factor _f_ and a range defined by _xlow_ and _xhigh_ inclusive, return a vector of the multiples of _f_ that fa...

11 mesi fa

Risolto


Smith numbers
Return true if the input is a Smith number in base ten. Otherwise, return false. Read about Smith numbers at http://en.wikipedia...

11 mesi fa

Risolto


Prime factor digits
Consider the following number system. Calculate the prime factorization for each number n, then represent the prime factors in a...

11 mesi fa

Risolto


"Low : High - Low : High - Turn around " -- Create a subindices vector
Let two vectors *lo* and *hi* be given. The job is to create a index vector like so idx = [lo(1):hi(1) lo(2):hi(2) ...]...

11 mesi fa

Risolto


Matrix indexing with two vectors of indices
Given a matrix M and two index vectors a and b, return a row vector x where x(i) = M(a(i),b(i)).

11 mesi fa

Risolto


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

11 mesi fa

Risolto


Reindex a vector
You are given two vectors of equal length. Vector N has numeric values (no Inf or NaN) while vector IDX has integers. Place th...

11 mesi fa

Risolto


Joining Ranges
You are given a n-by-2 matrix. Each row represents a numeric range, e.g. x = [0 5; 10 3; 20 15; 16 19; 25 25] contains...

11 mesi fa

Risolto


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

11 mesi fa

Risolto


Replace May with April
For instance, if the input is input_str = 'The flowers may bloom in April'; then the output is output_str = 'The flo...

11 mesi fa

Risolto


commutative?
Given the handle to a binary function that takes two ordinary numbers, test if the function is commutative.

11 mesi fa

Risolto


root?
* Given a function 'foo', and a position 'there', find the root near 'there'. * For example: If foo=@sin, and there=3.1, then r...

11 mesi fa

Risolto


Find files with extension ext in the current directory
List all files with extension 'ext' in the current directory. Return a char matrix with the name of files in rows. Return 0 if...

11 mesi fa

Risolto


Evil Number
Check if a given natural number is evil or not. Read more at <https://oeis.org/A001969 OEIS>.

11 mesi fa

Risolto


Find Missing Number
A little problem (inspired by CodeChef) for the coffee break. A friend give you an array of size n-1 integers and these int...

11 mesi fa

Risolto


nth Rational Number
Return the nth rational number. This is the inverse to Problem 1471. Index of a Rational number The first ten positive rationa...

11 mesi fa

Risolto


Is this number Munchhausen?
In this problem, simply return 1 if a supplied number is Munchhausen or 0 if not. Example 153 is narcissistic but not a Munchh...

11 mesi fa

Risolto


Narcissistic number ?
Inspired by Problem 2056 created by Ted. In recreational number theory, a narcissistic number is a number that is the sum of ...

11 mesi fa

Carica altro