Resuelto


Cubic Integer Constrained Solution
Find an integral non-trivial solution (x,y,z ~=0) (x=0 or y=0 or z=0 are trivial) for the cubic equation 987,654,321x + 12...

alrededor de 14 años hace

Resuelto


Book Club
A book club that has _K_ members, as a group, have to read _N_ books. Return how many different ways the members could read the ...

alrededor de 14 años hace

Problema


Book Club
A book club that has _K_ members, as a group, have to read _N_ books. Return how many different ways the members could read the ...

alrededor de 14 años hace | 3 | 23 solvers

Resuelto


Compute a dot product of two vectors x and y
x and y are input vectors, d is a number and contains their dot product

alrededor de 14 años hace

Resuelto


Make blocks of color
Given a (Nx3) sequence of RGB colors, I want to create a (numRowBlocks x numColBlocks x 3) image comprising (blockSize x blockSi...

alrededor de 14 años hace

Resuelto


Determine Whether an array is empty
Input a matrix x, output y is TRUE if x is empty, otherwise FALSE.

alrededor de 14 años hace

Resuelto


Get the length of a given vector
Given a vector x, the output y should equal the length of x.

alrededor de 14 años hace

Resuelto


Rotate a Matrix
Input a Matrix x, Output y is the matrix rotating x 90 degrees clockwise

alrededor de 14 años hace

Resuelto


Cryptomath: Addition
W A I T + A L L --------- G I F T S equals: 9 6 0 8 + 6 7 7 --------- 1 0 2 8 5 Given str...

alrededor de 14 años hace

Resuelto


Multiply a column by a row
* Given a column vector C and and a row vector R. * Output a matrix M. * Every column of M equals to C multiplied by correspon...

alrededor de 14 años hace

Resuelto


Nilpotent matrix
Check if matrix A is <http://mathworks.com/ nilpotent>.

alrededor de 14 años hace

Resuelto


edge detection
write a function that gives the indexes of rising or falling edge x is a vector (assume it contains always at least one eleme...

alrededor de 14 años hace

Resuelto


surrounded matrix
With a given matrix A (size m x n) create a matrix B (size m+2 x n+2) so that the matrix A is surrounded by ones: A = [1 2 ...

alrededor de 14 años hace

Resuelto


Is A the inverse of B?
Given a matrix A and a matrix B, is A the inverse of B? >>A=[2,4;3,5]; >>B=[-2.5,2;1.5,-1]; >>isInverse...

alrededor de 14 años hace

Resuelto


Whether the input is vector?
Given the input x, return 1 if x is vector or else 0.

alrededor de 14 años hace

Resuelto


Next lexicographic - permutation
Find next lexicographic - permutation (permutations as it would occur in a dictionary order). E.g: nextP('ABCD') = ABDC I...

alrededor de 14 años hace

Resuelto


Decode a simplified barcode
Given a bar code from this <http://www.mathworks.com/matlabcentral/cody/problems/602-make-a-simplified-bar-code exercise>: Re...

alrededor de 14 años hace

Resuelto


Make a simplified barcode
Given an integer to encode, make a barcode using the following encoding scheme: * The bar code is made from the binary versio...

alrededor de 14 años hace

Resuelto


The Birthday Phenomenon
First off, leap years are not being considered for this. In fact the year that people are born shouldn't be taken into considera...

alrededor de 14 años hace

Resuelto


speed vs size
The given string describes some MATLAB expressions such as 'pause(1)'. Compute its performance score = code size + run time in m...

alrededor de 14 años hace

Resuelto


More luck than brains
Give a random function that guess and return numbers from 1 to 6 exactly like the test suite .

alrededor de 14 años hace

Resuelto


Reduce - Map-Reduce
Write reduce function, that takes arguments and constantly folds results into next call argument, finally returning a value; ...

alrededor de 14 años hace

Resuelto


"Look and say" sequence
What's the next number in this sequence? * [0] * [1 0] * [1 1 1 0] * [3 1 1 0] * [1 3 2 1 1 0] This a variant on the w...

alrededor de 14 años hace

Resuelto


Greed is good - Simple partition P[n].
Find a simple partition P[n]. E.g. P[10] = 4 + 3 + 2 + 1. # There are many solutions, compute just one set. # Don't repeat ...

alrededor de 14 años hace

Resuelto


Create a patchwork matrix
This function will assemble a large matrix out of a number of smaller ones m1, m2, etc., according to a pattern P. If P is 3x5,...

alrededor de 14 años hace

Resuelto


Matrix indexing with two vectors of indices
Given a matrix M and two index vectors a and b, return a row vector x where x(i) = M(a(i),b(i)).

alrededor de 14 años hace

Resuelto


All Humans are Created Equal - Pareto Equality
One way or the other two sets of identical types can come out ahead of the other by idea of Pareto equality. Pareto equality b...

alrededor de 14 años hace

Resuelto


Sum the Infinite Series II
For any x in the range 0 < x and x < 2*pi radians, find the sum of the following infinite series: c = 1 + 1/2*cos(x) + 1/2*3...

alrededor de 14 años hace

Resuelto


Implement a counter
Write a function that returns a function that counts the number of times it is invoked. Example: >> h = counter; >> h() ...

alrededor de 14 años hace

Resuelto


Function composition - harder
Write a function that accepts an arbitrary number of function handles f_1, f_2, ..., f_n and returns the composition h. That is,...

alrededor de 14 años hace

Cargar más