解決済み


first step for Huffman Coding (easy)
Given a string, you must sort the characters by occurrence (from lowest to highest). This step is necessary to generate a Huf...

8年弱 前

解決済み


Find prime number couples
Given a vector a, which will always contain at least one pair of prime numbers couple, return a matrix called 'couple' in which ...

8年弱 前

解決済み


drowsy?
This dog() may be drowsy or function immediately when you call, return 1 or 0 accordingly within 2/10 second.

8年弱 前

解決済み


exactly?
given two strings of numeric expressions such as '1-7/14' and '11/22+0.2^2', return 1 if they are numerically exactly equal othe...

8年弱 前

解決済み


Dancing with wolves?
let wolf() make one or two steps to get a feel of the beat, it is waltz, do not let wolf() make the third step, return safely ju...

8年弱 前

解決済み


Multiply to the limit?
If y = 4*x*x/pi/pi then what is the ultimate limiting result of (1+y/1/1)(1+y/3/3)(1+y/5/5)(1+y/7/7)... ... within 1000*eps?

8年弱 前

解決済み


Rescaling vector
Rescale the entries of a vector x so that it spams [a,b]. The new values should be linearly stretched into the new range. _Ex...

8年弱 前

解決済み


Finite Continued Fraction
Given an input real number x and a natural number n, output the row vector with the n first terms of the continued fraction. F...

8年弱 前

解決済み


Dots in a Diamond
Return how many <http://en.wikipedia.org/wiki/Diamond_cubic Diamond Cubic> lattice grid points there are inside a 3D sphere of r...

8年弱 前

解決済み


Champernowne Constant
The <http://en.wikipedia.org/wiki/Champernowne_constant Champernowne constant> is a real number whose digits in decimal represen...

8年弱 前

解決済み


Recurring Cycle Length (Inspired by Project Euler Problem 26)
Preface: This problem is inspired by <http://projecteuler.net/problem=26 Project Euler Problem 26> and uses text from that quest...

8年弱 前

解決済み


Second Diagonal
Transpose the matrix from it's second diagonal.

8年弱 前

解決済み


Evaluating continued fractions
Given row vector c=[c0 c1 c2 c3 ...] evaluate the continued fraction x=c0+1/(c1+1/(c2+1/(c3+...))) If c is a ...

8年弱 前

解決済み


Find the sines of an isosceles triangle when given its area and height
Find the sines of an isosceles triangle when given its area and height. For example, when A=60 and h=5, the result is [0.3752...

8年弱 前

解決済み


Minimal cost
A power house, P, is on one bank of a straight river W meters wide, and a factory, F, is on the opposite bank L meters downstr...

8年弱 前

解決済み


Conic equation
A conic of revolution (around the |z| axis) can be defined by the equation s^2 – 2*R*z + (k+1)*z^2 = 0 where |s^2=x^2+y...

8年弱 前

解決済み


Convex Hull Capture
Imagine four points in uv that form a square. uv = [ ... 0,0; 0,2; 2,2; 2,0]; Now we have two more po...

8年弱 前

解決済み


Euclidean distance from a point to a polynomial
A not uncommon problem in the area of computational geometry is to find the closest point to a straight line from a given point,...

8年弱 前

解決済み


Placing Beads Neatly in a Box
You are given a string of n black and white beads. Your job is to pack them neatly into a square box. "Neatly" in this case mean...

8年弱 前

解決済み


Shifted Hexagonal Tiling Dots in a Circle
Return how many <http://en.wikipedia.org/wiki/Hexagonal_grid Hexagonal Tiling> grid points there are inside a circle of radius _...

8年弱 前

解決済み


Crossing to Kissing - Untangle the Lines
Turn lines that cross into lines that kiss. You will be given two lines that cross at some point. Your job is to untangle the...

8年弱 前

解決済み


Draw 'D'.
Draw a x-by-x matrix 'D' using 0 and 1. example: x=4 ans= [1 1 1 0 1 0 0 1 1 0 0 1 1 1 1 0]

8年弱 前

解決済み


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

8年弱 前

解決済み


Minimum Distance between two N-sided Polygons
This Challenge is to determine the minimum distance between two non-overlapping polygons. The input is a cell array of two vecto...

8年弱 前

解決済み


The Top 5 Primes
This problem series invites you to solve two simple problems related to the integer NUMBER FIVE, in order to celebrate <https://...

8年弱 前

解決済み


Draw 'C'.
Given x as input, generate a x-by-x matrix 'C' using 0 and 1 . example: x=4 ans= [0 1 1 1 1 0 0 0 ...

8年弱 前

解決済み


Snakes on a plane
Given the dimensions of a 2-d plane, create a matrix where a "snake" of ones occupies the plane from top left to bottom right. ...

8年弱 前

解決済み


Segmented number sequence
Given a positive integer, n, and a row vector, x, of positive integers, return a row vector, v, which is a sequence of length n ...

8年弱 前

解決済み


Optimally fill a container with elements of different sizes
Given a row vector V of different numerical values and a size limit L, return a 1x2 vector A, containing (a) the largest sum of ...

8年弱 前

解決済み


Approximate e
Given a and n, compute and approximation to f = a * e ^ n, without the use of exp, string operations, or floating point numbers....

8年弱 前

さらに読み込む