문제를 풀었습니다

Increment a number, given its digits
Take as input an array of digits (e.g. x = [1 2 3]) and output an array of digits that is that number "incremented" properly, (i...

약 11년 전

문제를 풀었습니다

Number of 1s in the Binary Representation of a Number
*Description* Return the number of 1s in the (unsigned integer) binary representation of a number. This function should be ab...

약 11년 전

문제를 풀었습니다

give nth decimal place of pi
max 15th place after the decimal point is ok for now

약 11년 전

문제를 풀었습니다

Given an input string with the scientific pitch notation for standard tuning ( <http://en.wikipedia.org/wiki/Guitar_tunings#Stan...

약 11년 전

문제를 풀었습니다

Too mean-spirited
Find the mean of each consecutive pair of numbers in the input row vector. For example, x=[1 2 3] ----> y = [1.5 2.5] x=[1...

약 11년 전

문제를 풀었습니다

Is my wife right?
Regardless of input, output the string 'yes'.

약 11년 전

문제를 풀었습니다

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

약 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년 전

문제를 풀었습니다

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

약 11년 전

문제를 풀었습니다

Remove all the consonants
Remove all the consonants in the given phrase. Example: Input s1 = 'Jack and Jill went up the hill'; Output s2 is 'a ...

약 11년 전

문제를 풀었습니다

Find the longest sequence of 1's in a binary sequence.
Given a string such as s = '011110010000000100010111' find the length of the longest string of consecutive 1's. In this examp...

약 11년 전

문제를 풀었습니다

Bullseye Matrix
Given n (always odd), return output a that has concentric rings of the numbers 1 through (n+1)/2 around the center point. Exampl...

약 11년 전

문제를 풀었습니다

Making change
Given an amount of currency, return a vector of this form: [100 50 20 10 5 2 1 0.5 0.25 0.1 0.05 0.01] Example: Input a = ...

약 11년 전

문제를 풀었습니다

Find the alphabetic word product
If the input string s is a word like 'hello', then the output word product p is a number based on the correspondence a=1, b=2, ....

약 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년 전

문제를 풀었습니다

Pangrams!
A pangram, or holoalphabetic sentence, is a sentence using every letter of the alphabet at least once. Example: Input s ...

약 11년 전

문제를 풀었습니다

Create times-tables
At one time or another, we all had to memorize boring times tables. 5 times 5 is 25. 5 times 6 is 30. 12 times 12 is way more th...

약 11년 전

문제를 풀었습니다

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

약 11년 전

문제를 풀었습니다

Check to see if a Sudoku Puzzle is Solved
*Description:* Your task, should you choose to accept it, is to make a function that checks to see if a 9x9 matrix of integer...

약 11년 전

문제를 풀었습니다

Counting Money
Add the numbers given in the cell array of strings. The strings represent amounts of money using this notation: \$99,999.99. E...

약 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년 전

문제를 풀었습니다

Return the 3n+1 sequence for n
A Collatz sequence is the sequence where, for a given number n, the next number in the sequence is either n/2 if the number is e...

약 11년 전

문제를 풀었습니다

Which values occur exactly three times?
Return a list of all values (sorted smallest to largest) that appear exactly three times in the input vector x. So if x = [1 2...

약 11년 전

문제를 풀었습니다

How to find the position of an element in a vector without using the find function
Write a function posX=findPosition(x,y) where x is a vector and y is the number that you are searching for. Examples: fin...

약 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년 전

문제를 풀었습니다

Quote Doubler
Given a string s1, find all occurrences of the single quote character and replace them with two occurrences of the single quote ...

약 11년 전

문제를 풀었습니다

Check if sorted
Check if sorted. Example: Input x = [1 2 0] Output y is 0

약 11년 전

문제를 풀었습니다

Weighted average
Given two lists of numbers, determine the weighted average. Example [1 2 3] and [10 15 20] should result in 33.333...

약 11년 전

문제를 풀었습니다

Sort a list of complex numbers based on far they are from the origin.
Given a list of complex numbers z, return a list zSorted such that the numbers that are farthest from the origin (0+0i) appear f...

약 11년 전

문제를 풀었습니다

Binary numbers
Given a positive, scalar integer n, create a (2^n)-by-n double-precision matrix containing the binary numbers from 0 through 2^n...

약 11년 전