已解决


Classify numbers as abundant, deficient, or perfect
A number is perfect if the sum of its proper divisors (i.e., divisors excluding the number itself) is equal to itself. For examp...

3 months 前

已解决


Find state names that end with the letter A
Given a list of US states, remove all the states that end with the letter A. Example: Input s1 = 'Alabama Montana Nebras...

3 months 前

已解决


Remove the small words from a list of words.
Your job is to tidy up a list of words that appear in a string. The words are separated by one or more spaces. Remove all words ...

3 months 前

已解决


Summing digits
Given n, find the sum of the digits that make up 2^n. Example: Input n = 7 Output b = 11 since 2^7 = 128, and 1 + ...

3 months 前

已解决


Find the numeric mean of the prime numbers in a matrix.
There will always be at least one prime in the matrix. Example: Input in = [ 8 3 5 9 ] Output out is 4...

3 months 前

已解决


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

3 months 前

已解决


The Goldbach Conjecture
The Goldbach conjecture asserts that every even integer greater than 2 can be expressed as the sum of two primes. Given the eve...

3 months 前

已解决


Number of 1s in a binary string
Find the number of 1s in the given binary string. Example. If the input string is '1100101', the output is 4. If the input stri...

3 months 前

已解决


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

3 months 前

已解决


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

3 months 前

已解决


Determine if input is odd
Given the input n, return true if n is odd or false if n is even.

3 months 前

已解决


Triangle Numbers
Triangle numbers are the sums of successive integers. So 6 is a triangle number because 6 = 1 + 2 + 3 which can be displayed ...

3 months 前

已解决


Chek the Delta = 6k gap conjecture about arithmetic progressions in the prime number set
Context In the prime numbers set there are some arithmetic progressions (sequences of three or more consecutive prime number...

3 months 前

已解决


Find common elements in matrix rows
Given a matrix, find all elements that exist in every row. For example, given A = 1 2 3 5 9 2 5 9 3 2 5 9 ...

3 months 前

已解决


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

3 months 前

已解决


Back and Forth Rows
Given a number n, create an n-by-n matrix in which the integers from 1 to n^2 wind back and forth along the rows as shown in the...

3 months 前

已解决


Compute the antisigma function
The sum of divisors function, or , is the sum of the numbers that divide . The antisigma function is the sum of numbers less tha...

3 months 前

已解决


Find a Pythagorean triple
Given four different positive numbers, a, b, c and d, provided in increasing order: a < b < c < d, find if any three of them com...

3 months 前

已解决


Who Has the Most Change?
You have a matrix for which each row is a person and the columns represent the number of quarters, nickels, dimes, and pennies t...

3 months 前

已解决


Transpose
Write a MATLAB script in order to convert a random length row vector (v) into a column vector.

3 months 前

已解决


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

3 months 前

已解决


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

3 months 前

已解决


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

3 months 前

已解决


Convert this color - RGB Vector to Hex String
Given a 3 element RGB vector corresponding to a color (given by the MATLAB color spec <http://www.mathworks.com/help/matlab/ref/...

3 months 前

已解决


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

3 months 前

已解决


Most nonzero elements in row
Given the matrix a, return the index r of the row with the most nonzero elements. Assume there will always be exactly one row th...

3 months 前

已解决


Rescale Scores
Each column (except last) of matrix X contains students' scores in a course assignment or a test. The last column has a weighted...

3 months 前

已解决


Convert array of decimal numbers into hexadecimal numbers array.
Convert array of decimal numbers into hexadecimal numbers array. Example x =[ 32 33 34 35 36 37 38 ...

3 months 前

已解决


Convert given decimal number to binary number.
Convert given decimal number to binary number. Example x=10, then answer must be 1010.

3 months 前

已解决


Which coins to give
I was in shop today. I admired, how shop assistant had to think, which coins to give me. The task is we have a vector v=[0.5 0.2...

3 months 前

加载更多