解決済み


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

12年以上 前

解決済み


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

12年以上 前

解決済み


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

12年以上 前

解決済み


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

12年以上 前

解決済み


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

12年以上 前

解決済み


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

12年以上 前

解決済み


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

12年以上 前

解決済み


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

12年以上 前

解決済み


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

12年以上 前

解決済み


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

12年以上 前

解決済み


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

12年以上 前

解決済み


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

12年以上 前

解決済み


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

12年以上 前

解決済み


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

12年以上 前

解決済み


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

12年以上 前

解決済み


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

12年以上 前

解決済み


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

12年以上 前

解決済み


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

12年以上 前

解決済み


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

12年以上 前

解決済み


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

12年以上 前

解決済み


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

12年以上 前

解決済み


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

12年以上 前

解決済み


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

12年以上 前

解決済み


Find nth maximum
Find nth maximum in a vector of integer numbers. Return NaN if no such number exists. x = [2 6 4 9 -10 3 1 5 -10]; So ...

12年以上 前

解決済み


Spherical surface triangulation
Create a triangulation of a spherical surface with approximately-uniform coverage <<http://www.alfnie.com/software/print_sphe...

12年以上 前

解決済み


GJam 2013 Veterans: Hedge
This Challenge is derived from <http://code.google.com/codejam/contest/2334486/dashboard Hedgemony>. This is the Large data set ...

12年以上 前

解決済み


Unit Matrix
Given n, you should return an n-by-n unit matrix. Example: If input is n=2 then A = [ 1 0 0 1 ] If input ...

12年以上 前

解決済み


GJam 2014 China Rd B: Sudoku Checker
This Challenge is derived from <http://code.google.com/codejam/contest/2929486/dashboard#s=p0 GJam 2014 China Sudoku>. Large Cas...

12年以上 前

解決済み


Equilibrium
Is this tower of blocks going to fall? <<http://www.alfnie.com/software/equilibrium02.jpg>> *Description* Given a stack...

12年以上 前

解決済み


Too Many Zeros, Dump Them!
Sometimes when I create a matrix, I use this syntax: a = zeros(1000,1000); But when the function ends, I find that I don'...

12年以上 前

さらに読み込む