已解决


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

13 years 前

已解决


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

13 years 前

已解决


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

13 years 前

已解决


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

13 years 前

已解决


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

13 years 前

已解决


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

13 years 前

已解决


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

13 years 前

已解决


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

13 years 前

已解决


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

13 years 前

已解决


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

13 years 前

已解决


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

13 years 前

已解决


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

13 years 前

已解决


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

13 years 前

已解决


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

13 years 前

已解决


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

13 years 前

已解决


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

13 years 前

已解决


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

13 years 前

已解决


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

13 years 前

已解决


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

13 years 前

已解决


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

13 years 前

已解决


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

13 years 前

已解决


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

13 years 前

已解决


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

13 years 前

已解决


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

13 years 前

已解决


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

13 years 前

已解决


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

13 years 前

已解决


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

13 years 前

已解决


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

13 years 前

已解决


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

13 years 前

已解决


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

13 years 前

加载更多