A résolu


MATLAB Prison: Summing light bulbs
On one wall in the MATLAB prison there is a row of n numbered light bulbs. Each bulb is controlled by a switch. Every morning, n...

plus de 10 ans il y a

A résolu


Full combinations
Given n input vectors x1, x2, …, xn, generate a p*n matrix y whose rows contain all element-wise combinations of the vectors x1,...

plus de 10 ans il y a

A résolu


Knights and Knaves (part 2)
_This is a Matlab adaptation of the_ <http://en.wikipedia.org/wiki/Knights_and_Knaves Knives and Knaves> _logical puzzles_. ...

plus de 10 ans il y a

A résolu


Mr. Pyramidad & Ms. Whissy Bolower
Businessman Mr. B. M. Pyramidad was drinking with his new girlfriend Ms. Whissy Bolower. He disclosed to her that he has an ille...

plus de 10 ans il y a

A résolu


Knights and Knaves (part 1)
This is a Matlab adaptation of the <http://en.wikipedia.org/wiki/Knights_and_Knaves Knights and Knaves> logical puzzles. You ...

plus de 10 ans il y a

A résolu


Spherical radius given four points
Determine the radius of a sphere provided four non-coplanar points on the surface of the sphere. pts = [x1 y1 z1; x...

plus de 10 ans il y a

A résolu


Make a function that returns its own character count
Write a function that returns a 128 element vector with an accurate inventory of the ASCII characters in its own function file. ...

plus de 10 ans il y a

A résolu


That's some divisor you've got there...
Given a positive integer x, calculate the sum of all of the divisors of the number. Please include the number itself in your fi...

plus de 10 ans il y a

A résolu


Breaking Bad Tiles (Spelling with Element Symbols)
Given a word, how you would spell it with element symbols from the periodic table? For instance, if given the string "Paper", yo...

plus de 10 ans il y a

A résolu


Number of divisors of a given number
Given a Number n, return the number of his divisors without listing them example: n=14 ; Divisors={1,7,2,14} ; y=4 n=...

plus de 10 ans il y a

A résolu


Is It a Snake?
Given an m-by-n matrix, return true if the elements of the matrix are a connected "snake" shape from 1 to m*n. Otherwise return ...

plus de 10 ans il y a

A résolu


How many ways to write a number
Given two positive numbers n and k, where n>=k. In how many ways can we write n as sum of k positive numbers. Same numbers but d...

plus de 10 ans il y a

A résolu


Regular polygon bounded by and bounding a circle
As the number of sides (or vertices) of a regular polygon goes to infinity, its perimeter and area go to the perimeter and area ...

plus de 10 ans il y a

A résolu


Rearrange string
Input is a given string. Output is the number of ways to rearrange the string.

plus de 10 ans il y a

A résolu


Choose group with people
How many ways can you choose n groups of n people from n^2 people, assuming the groups are distinct? The number of people i...

plus de 10 ans il y a

A résolu


Regex match
Many regular expression engines have a simple function to quickly know whether a regular expression entirely matches a string or...

plus de 10 ans il y a

A résolu


Two fractions, one sum
Given a positive number x, write a MATLAB script that will tell you how many ways that the reciprocal of that number can be writ...

plus de 10 ans il y a

A résolu


Accessing values in a cell
You are given c, which is a 1xN cell array, and a and b, which are each two 1xM vectors. Your job is to give the bth value in t...

plus de 10 ans il y a

A résolu


longest common semi-substring
Finding longest common substring is a common problem in string processing. This problem is a variant of that. Two strings are...

plus de 10 ans il y a

A résolu


Esoteric Trigonometry
From Wikipedia: "All of the trigonometric functions of an angle θ can be constructed geometrically in terms of a unit circle cen...

plus de 10 ans il y a

A résolu


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

plus de 10 ans il y a

A résolu


Gene Sequence Contest: Retro
The <http://www.mathworks.com/matlabcentral/contest/contests/21/rules Full Gene Sequence Rules and examples>. This Challenge ...

plus de 10 ans il y a

A résolu


Temperature Conversion Utility (Strings)
This is a follow-on problem to <http://www.mathworks.com/matlabcentral/cody/problems/2413-temperature-conversion-utility Problem...

plus de 10 ans il y a

A résolu


Find the longest match inside two strings
Given two strings, find the longest string which is contained within both strings. e.g. the longest string that is contained ...

plus de 10 ans il y a

A résolu


Arithmetic/geometric sequence, 50/50
a(1) = 0 a(2) = 1 a(2*N) = sqrt(a(2*N-1)*a(2*N+1)) a(2*N+1) = (a(2*N)+a(2*N+2))/2 given _n_ return _a(n)_

plus de 10 ans il y a

A résolu


Eliminate Outliers Using Interquartile Range
Given a vector with your "data" find the outliers and remove them. To determine whether data contains an outlier: # Identi...

plus de 10 ans il y a

A résolu


List of built-in demo images
Return a cell array containing the filenames for built-in images (e.g. cameraman.tif, coins.png). An optional input specifies wh...

plus de 10 ans il y a

A résolu


GJam March 2016 IOW: Password Single
This Challenge is derived from <http://code.google.com/codejam/contest/8274486/dashboard#s=p3 GJam March 2016 Annual I/O for Pas...

plus de 10 ans il y a

A résolu


Determine the full width at half max
Determine the full width at half max of a curve. The full width at half maximum (FWHM) is a parameter which is used for desc...

plus de 10 ans il y a

A résolu


Leftovers? Again?!
I am thinking of a positive number X. To determine what number I am thinking of, I will give you two 1xN vectors. The first ve...

plus de 10 ans il y a

Charger plus