Resuelto


Accumulate Cells
Given a combining function, a cell array, and an initial value, accumulate the result. For example, accumcell(@plus,{1,...

casi 12 años hace

Resuelto


Find the biggest empty box
You are given a matrix that contains only ones and zeros. Think of the ones as columns in an otherwise empty floor plan. You wan...

casi 12 años hace

Resuelto


Ackermann's Function
Ackermann's Function is a recursive function that is not 'primitive recursive.' <http://en.wikipedia.org/wiki/Ackermann_fun...

casi 12 años hace

Resuelto


Reindex a vector
You are given two vectors of equal length. Vector N has numeric values (no Inf or NaN) while vector IDX has integers. Place th...

casi 12 años hace

Resuelto


Return the first and last character of a string
Return the first and last character of a string, concatenated together. If there is only one character in the string, the functi...

casi 12 años hace

Resuelto


Convert a vector into a number
This is a sub problem related to this problem: <http://www.mathworks.com/matlabcentral/cody/problems/621-cryptomath-addition>...

casi 12 años hace

Resuelto


surface of a spherical planet
you just discovered its circumference, that is the input.

alrededor de 12 años hace

Resuelto


Balanced number
Given a positive integer find whether it is a balanced number. For a balanced number the sum of first half of digits is equal to...

alrededor de 12 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 12 años hace

Resuelto


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

alrededor de 12 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 12 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 12 años hace

Problema


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 12 años hace | 5 | 96 solvers

Problema


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 12 años hace | 6 | 99 solvers

Problema


Function composition
Write a function that accepts two function handles f and g and returns the composition h. That is, h = (f o g)(x) = f(g(x)) ...

alrededor de 12 años hace | 1 | 230 solvers

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 12 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 12 años hace

Resuelto


Function composition
Write a function that accepts two function handles f and g and returns the composition h. That is, h = (f o g)(x) = f(g(x)) ...

alrededor de 12 años hace

Resuelto


Find best placement for ordered dominoes (harder)
Given a list of ordered pairs, find the order they should be placed in a line, such that the sum of the absolute values of the d...

alrededor de 12 años hace

Resuelto


Scoring for oriented dominoes
Given a list of ordered pairs, and the order they should be placed in a line, find the sum of the absolute values of the differe...

alrededor de 12 años hace

Resuelto


How to add?
* Imagine you are in 2222 Anno Domini, when everyone must learn how to add, * and competing for the highly prestigious post of,...

alrededor de 12 años hace

Resuelto


radius of a spherical planet
you just measured its surface area, that is the input.

alrededor de 12 años hace

Resuelto


magic solver
Create a function that returns _true_ and has a cody <http://www.mathworks.com/matlabcentral/cody/problems/256-return-the-size-o...

alrededor de 12 años hace

Resuelto


Flip the main diagonal of a matrix
Given a n x n matrix, M, flip its main diagonal. Example: >> M=magic(5); >> flipDiagonal(M) 9 24 1 ...

alrededor de 12 años hace

Resuelto


"Low : High - Low : High - Turn around " -- Create a subindices vector
Let two vectors *lo* and *hi* be given. The job is to create a index vector like so idx = [lo(1):hi(1) lo(2):hi(2) ...]...

alrededor de 12 años hace

Resuelto


root?
* Given a function 'foo', and a position 'there', find the root near 'there'. * For example: If foo=@sin, and there=3.1, then r...

alrededor de 12 años hace

Resuelto


Vectorizing, too easy or too hard?
Please insert a . before any ^, * or / in the string. That's it!!

alrededor de 12 años hace

Resuelto


Create a square matrix of multiples
Given an input, N, output a matrix N x N with each row containing multiples of the first element of each row. This also applies...

alrededor de 12 años hace

Resuelto


Cody Computer Part 1 - Guess the system font used by uipanel
list = listfonts return the list of available system fonts. Can you guess which font is used for uipanel on the CODY computer...

alrededor de 12 años hace

Resuelto


Back to basics 20 - singleton dimensions
Covering some basic topics I haven't seen elsewhere on Cody. Remove the singleton dimensions from the input variable (e.g. if...

alrededor de 12 años hace

Cargar más