Resuelto


old wine in a new bottle?
* You have been given an apparently brand new unary function XXX, * that maps some ordinary scalars to scalars, * please gues...

3 meses hace

Resuelto


Trickier Timing
You solution should return control to main program only when the current time ends in either a 5 or 0 (e.g. the current seconds ...

3 meses hace

Resuelto


Tricky timing
Write a function that takes between 0.5 seconds and 0.6 seconds to run.

3 meses hace

Resuelto


Biggest Value in the (Neighbor)Hood
For this challenge you get two inputs: a matrix A and an integer value n. Your function should return a Matrix B of the same siz...

3 meses hace

Resuelto


Find the stride of the longest skip sequence
We define a _skip sequence_ as a regularly-spaced list of integers such as might be generated by MATLAB's <http://www.mathworks....

3 meses hace

Resuelto


Valid Chess Moves
Using standard Algebraic notation ('' for a pawn), given previous move and a next move, output true if it is a valid move or fal...

3 meses hace

Resuelto


Generalized sorting
Write generalized sort function |sortg()| that sorts array elements in &ldquo;ascending&rdquo; order with given comparison funct...

3 meses hace

Resuelto


Return the Nth Output from an Input Command
*Description* Given _F_, a cell array whose first element is a function handle and subsequent elements are arguments, return ...

3 meses hace

Resuelto


Four quadrant inverse tangent function.
Create a function that returns an array P the same size as X and Y containing the element-by-element, four-quadrant inverse tang...

3 meses hace

Resuelto


Signal filtering
You are given a vector, containing a superposition of target signal and white gaussian noise. Return a vector, containing the es...

3 meses hace

Resuelto


yet another flying fly (YAFF)
Same as the previous problem <http://www.mathworks.com/matlabcentral/cody/problems/203-fly-fly-away fly fly away> but now with *...

3 meses hace

Resuelto


Recurrence relation
A recurrence relation is given by P(1) := 1 P(n+1) := exp(1) - (n+1)*P(n) Write a function that, given an integer |...

3 meses hace

Resuelto


N-Queens Checker
Picture a chessboard populated with a number of queens (i.e. pieces that can move like a queen in chess). The board is a matrix,...

3 meses hace

Resuelto


Minefield Sonar
*Background* In mine-hunting games (e.g. Microsoft Minesweeper), the user is provided with a covered grid that, upon a left c...

3 meses hace

Resuelto


Figurate number triangle
Check whether the input matrix is a figurate number triangle: <http://mathworld.wolfram.com/FigurateNumberTriangle.html>

3 meses hace

Resuelto


Magic!
Check whether the input matrix is a normal magic square: http://en.wikipedia.org/wiki/Magic_square Output the logical value tr...

3 meses hace

Resuelto


Robust Corner Sum with Special Value Handling in Arrays
Compute the sum of the corner elements of an array (vector or matrix). If any corner element is NaN, return NaN. If any corner...

3 meses hace

Problema


Robust Corner Sum with Special Value Handling in Arrays
Compute the sum of the corner elements of an array (vector or matrix). If any corner element is NaN, return NaN. If any corner...

3 meses hace | 0 | 8 solvers

Resuelto


Remove the air bubbles
Given a matrix a, return a matrix b in which all the zeros have "bubbled" to the top. That is, any zeros in a given column shoul...

3 meses hace

Resuelto


Wilf-Zeilberger pairs
Take as inputs two functions _F_ and _G_, and two scalar values _n_ and _k_. Test whether the functions are candidates to be a W...

3 meses hace

Resuelto


Count from 0 to N^M in base N.
Return an array of numbers which (effectively) count from 0 to N^M-1 in base N. The result should be returned in a matrix, with ...

3 meses hace

Resuelto


Connect Four Win Checker
<http://en.wikipedia.org/wiki/Connect_Four Connect Four> is a game where you try to get four pieces in a row. For this problem, ...

3 meses hace

Resuelto


Implement a ROT13 cipher
Replace each character in string s1 with the character that is shifted 13 positions from it (wrap back to the beginning if neces...

3 meses hace

Resuelto


Encode Roman Numerals
Create a function taking a non-negative integer as its parameter and returning a string containing the Roman Numeral representat...

3 meses hace

Resuelto


Summing Digits within Text
Given a string with text and digits, add all the numbers together. Examples: Input str = '4 and 20 blackbirds baked in a...

3 meses hace

Resuelto


QWERTY coordinates
Given a lowercase letter or a digit as input, return the row where that letter appears on a standard U.S. QWERTY keyboard and it...

3 meses hace

Resuelto


Given a window, how many subsets of a vector sum positive
Given a vector: [1 0 -1 3 2 -3 1] and a window of 2, A sliding window would find: 1 + 0 = 1 0 - 1 = -1 ...

3 meses hace

Resuelto


Make a run-length companion vector
Given a vector x, return a vector r that indicates the run length of any value in x. Each element in r shows how many times the ...

3 meses hace

Resuelto


How long is the longest prime diagonal?
Stanislaw Ulam once observed that if the counting numbers are arranged in a spiral, the prime numbers contained in it form a sur...

3 meses hace

Resuelto


Spot the outlier
All points except for one lie on a line. Which one is the outlier? Example: You are given a list of x-y pairs in a column ...

3 meses hace

Cargar más