Resuelto


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

casi 13 años hace

Resuelto


A matrix of introverts
You are given a matrix full of numbers who happen to be very shy. Write a MATLAB function that will put a square of zeros aroun...

casi 13 años hace

Resuelto


Insert structure in a parameter-cell array.
When creating Matlab GUI elements, you can mix value pairs with structures in the list of input arguments, e.g. |uicontrol('t...

casi 13 años hace

Resuelto


Swap two numbers
Example Input: a = 10 b = 20 Output a = 20 b = 10

casi 13 años hace

Resuelto


Check if it is a square or cube of consecutive numbers
Check whether the element of given row vector is a square or cube of consecutive numbers. For example Input x=[4 27 16 25 ...

casi 13 años hace

Resuelto


poll: would you like the regexp (?@cmd) functionality to be banned in Cody?
This problem is a poll (and a little bit of "white hat hacktivism" as well) regarding Cody users sentiment about the use of rege...

casi 13 años hace

Resuelto


Skyscrapers - Puzzle
The Skyscraper puzzle challenge comes from <http://logicmastersindia.com/home/ Logic Masters India> and <http://www.conceptispuz...

casi 13 años hace

Resuelto


Magic Concentric Circles
Consider 4 magic circle circles around a single number in the sequence 1:n where the sum along the diameters is always equal, an...

casi 13 años hace

Resuelto


Consecutive Powers
Return 2 numbers and 2 powers such that their difference is 1 A 4 element row vector is expected: x where x(1)^x(2) - x(...

casi 13 años hace

Resuelto


Length of the hypotenuse
Given short sides of lengths a and b, calculate the length c of the hypotenuse of the right-angled triangle. <<http://upload....

casi 13 años hace

Resuelto


Compute Fibonacci Number
Compute the _n_-th Fibonacci Number f(0) = 0, f(1) = 1, f(2) = 1, f(3) = 2, ... f(42) = 267914296

casi 13 años hace

Resuelto


Number Persistence
A number's persistence is the number of steps required to reduce it to a single digit by multiplying all its digits to obtain a ...

casi 13 años hace

Resuelto


Tony's trick for duplicating an mx1 vector n times
Without using repmat, or for loop, or concatenation, create a function to duplicate a vector, v, a specified number of times, n....

casi 13 años hace

Resuelto


How unique?
Sometimes, when we check unique entries of vector we would like to know how many times each value occurs. Given vector of num...

casi 13 años hace

Resuelto


Another colon problem
This is simple problem based on problems 555, 801, 1118, etc. Create an index vector from two input vectors. Example: ...

casi 13 años hace

Resuelto


Self-Description
This is a simplified version of the <http://xkcd.com/688/ *xkcd comic* by the same name>. Simply return the angle (in degrees...

alrededor de 13 años hace

Resuelto


Convert matrix to 3D array of triangular matrices
Given a 2D numeric array x in which each column represents the vectorized form of an upper triangular matrix, return a 3D array ...

alrededor de 13 años hace

Resuelto


Grid traversal
Given a line defined by (x1,y1) & (x2,y2),return the number of squares that the line crosses on the grid (a square is 1x1). ...

alrededor de 13 años hace

Resuelto


German tank problem
The <http://en.wikipedia.org/wiki/German_tank_problem German tank problem> is a well-known statistical problem that attempts to ...

alrededor de 13 años hace

Resuelto


Solve the picross! (Easy)
Solve the picross! <http://en.wikipedia.org/wiki/Nonogram> The arguments (horz and vert) are cells containing the clues, e...

alrededor de 13 años hace

Resuelto


GJam 2014 China Rd B: Dragon Maze
This Challenge is derived from <http://code.google.com/codejam/contest/2929486/dashboard#s=p3 GJam 2014 China Dragon Maze>. Smal...

alrededor de 13 años hace

Resuelto


Write a cubic formula function
Create a function that will output the three roots of a cubic equation specified by the 4 coefficients listed as input. The outp...

alrededor de 13 años hace

Resuelto


Better Index Number
Let's say you want to save many, many files and append these files with a certain sortable index number. As you probably know, y...

alrededor de 13 años hace

Resuelto


Fibonacci-Sum of Squares
Given the Fibonacci sequence defined by the following recursive relation, * F_n = F_(n-1) + F_(n-2) * where F_0 = 0 and F_1 ...

alrededor de 13 años hace

Resuelto


Signed Magnitude
For a given input vector, return the value that is furthest from zero. For example, if x = [1 2 -12] return -12.

alrededor de 13 años hace

Resuelto


GJam 2014 China Rd B: Party
This Challenge is derived from <http://code.google.com/codejam/contest/2929486/dashboard#s=p1 GJam 2014 China Party>. Small Case...

alrededor de 13 años hace

Resuelto


Lowest sum from a group of digits
Hi there. It's James's daughter here again, and my third grade math teacher is up to her old tricks. This time, she's giving u...

alrededor de 13 años hace

Resuelto


Get input and output variable names
Given a string representing a function header, return the variable names used for the inputs and outputs. For example if inp...

alrededor de 13 años hace

Resuelto


GJam 2013 Veterans: Ocean View (Small)
This Challenge is derived from <http://code.google.com/codejam/contest/2334486/dashboard#s=p2 GJam 2013 Veterans Ocean View>. Th...

alrededor de 13 años hace

Resuelto


GJam 2013 Veterans: Baby Height Prediction
This Challenge is derived from <http://code.google.com/codejam/contest/2334486/dashboard#s=p1 GJam 2013 Veterans Baby Height>. O...

alrededor de 13 años hace

Cargar más