解決済み


Interpolator
You have a two vectors, a and b. They are monotonic and the same length. Given a value, va, where va is between a(1) and a(end...

約11年 前

解決済み


Scrabble Scores
Given a word, determine its score in <http://en.wikipedia.org/wiki/Scrabble Scrabble>. The input string will always be provide...

約11年 前

解決済み


The Goldbach Conjecture, Part 2
The <http://en.wikipedia.org/wiki/Goldbach's_conjecture Goldbach conjecture> asserts that every even integer greater than 2 can ...

約11年 前

解決済み


Test for balanced parentheses
Given the input inStr, give the boolean output out indicating whether all the parentheses are balanced. Examples: * If ...

約11年 前

解決済み


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

約11年 前

解決済み


Function Iterator
Given a handle fh to a function which takes a scalar input and returns a scalar output and an integer n >= 1, return a handle f...

約11年 前

解決済み


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

約11年 前

解決済み


Indexed Probability Table
This question was inspired by a Stack Overflow question forwarded to me by Matt Simoneau. Given a vector x, make an indexed pro...

約11年 前

解決済み


Sums with Excluded Digits
Add all the integers from 1 to n in which the digit m does not appear. m will always be a single digit integer from 0 to 9. no...

約11年 前

解決済み


Extract leading non-zero digit
<http://en.wikipedia.org/wiki/Benford%27s_law Benford's Law> states that the distribution of leading digits is not random. This...

約11年 前

解決済み


QWERTY coordinates
Given a lowercase letter or a digit as input, return the row where that letter appears on a <http://en.wikipedia.org/wiki/Keyboa...

約11年 前

解決済み


Make a Palindrome Number
Some numbers like 323 are palindromes. Other numbers like 124 are not. But look what happens when we add that number to a revers...

約11年 前

解決済み


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

約11年 前

解決済み


Probability of Choosing a Red Ball
Given two jars of red and blue balls, find the probability of choosing a red ball from Jar 1 after going through the steps. ...

約11年 前

解決済み


Return a list sorted by number of occurrences
Given a vector x, return a vector y of the unique values in x sorted by the number of occurrences in x. Ties are resolved by a ...

約11年 前

解決済み


Which doors are open?
There are n doors in an alley. Initially they are all shut. You have been tasked to go down the alley n times, and open/shut the...

約11年 前

解決済み


Elapsed Time
Given two date strings d1 and d2 of the form yyyy/mm/dd HH:MM:SS (assume hours HH is in 24 hour mode), determine how much time, ...

約11年 前

解決済み


De-dupe
Remove all the redundant elements in a vector, but keep the first occurrence of each value in its original location. So if a =...

約11年 前

解決済み


Pascal's Triangle
Given an integer n >= 0, generate the length n+1 row vector representing the n-th row of <http://en.wikipedia.org/wiki/Pascals_t...

約11年 前

解決済み


Nearest Numbers
Given a row vector of numbers, find the indices of the two nearest numbers. Examples: [index1 index2] = nearestNumbers([2 5 3...

約11年 前

解決済み


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

約11年 前

解決済み


Back to the future
See test suite See also: http://www.mathworks.com/matlabcentral/cody/problems/2449-back-to-the-future-ii

約11年 前

解決済み


Cell joiner
You are given a cell array of strings and a string delimiter. You need to produce one string which is composed of each string fr...

約11年 前

解決済み


Function definition: Double down.
* Complete the DoubleDown function to return twice the initialValue.

約11年 前

解決済み


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

約11年 前

解決済み


Target sorting
Sort the given list of numbers |a| according to how far away each element is from the target value |t|. The result should return...

約11年 前

解決済み


Simple Caesar Cypher - shift encrypt a message given an index number
A Caesar cypher is a simple shift encryption method. Your goal is to create a function that allows a user to input a string and ...

約11年 前

解決済み


The Goldbach Conjecture
The <http://en.wikipedia.org/wiki/Goldbach's_conjecture Goldbach conjecture> asserts that every even integer greater than 2 can ...

約11年 前

解決済み


Test within tolerance
Given a vector of experimental data, D, and a vector of truth data, T, return FALSE if any +/- errors (D-T) are outside a given ...

約11年 前

解決済み


self description 2.0
New (and way easier) hacking problem built upon <http://www.mathworks.com/matlabcentral/cody/problems/1969 Alfonso's problem 196...

約11年 前

さらに読み込む