解決済み


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年 前

解決済み


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

約3年 前

解決済み


Prime factor digits
Consider the following number system. Calculate the prime factorization for each number n, then represent the prime factors in a...

約3年 前

解決済み


Renaming a field in a structure array
MATLAB has a <http://www.mathworks.com/help/techdoc/ref/setfield.html setfield> and a <http://www.mathworks.com/help/techdoc/ref...

約3年 前

解決済み


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

約3年 前

解決済み


Calculate the Levenshtein distance between two strings
This problem description is lifted from <http://en.wikipedia.org/wiki/Levenshtein_distance>. The Levenshtein distance betwee...

約3年 前

解決済み


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年 前

解決済み


Method of Common Differences part-2
This is the inverse problem to <http://www.mathworks.com/matlabcentral/cody/problems/1485 Problem 1485>. Problem 1485 illustra...

約3年 前

解決済み


Word Distance - Sum
Let's suppose that the distance of a word can be calculated by summing the differences between its letters, having assigned the ...

約3年 前

解決済み


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年 前

解決済み


Remove any row in which a NaN appears
Given the matrix A, return B in which all the rows that have one or more <http://www.mathworks.com/help/techdoc/ref/nan.html NaN...

約3年 前

解決済み


Finding Perfect Squares
Given a vector of numbers, return true if one of the numbers is a square of one of the other numbers. Otherwise return false. E...

約3年 前

解決済み


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

約3年 前

解決済み


二つのベクトルの要素ごとの積の平均を計算しよう
二つの同じ長さのベクトルが与えられたとき、二つのベクトルの要素ごとの積の平均を求めましょう。 例: 二つのベクトル [1 2 3] と [10 15 20] が与えられたとき、 それぞれの要素ごとの積の平均を取ると、 解は 33.33...

約3年 前

解決済み


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

約3年 前

解決済み


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

約3年 前

解決済み


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

約3年 前

解決済み


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年 前

解決済み


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

約3年 前

解決済み


Remove the vowels
Remove all the vowels in the given phrase. Example: Input s1 = 'Jack and Jill went up the hill' Output s2 is 'Jck nd Jll wn...

約3年 前

解決済み


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年 前

解決済み


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年 前

解決済み


Pizza!
Given a circular pizza with radius _z_ and thickness _a_, return the pizza's volume. [ _z_ is first input argument.] Non-scor...

約3年 前

解決済み


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

約3年 前

解決済み


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

約3年 前

解決済み


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年 前

解決済み


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

約3年 前

解決済み


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

約3年 前

解決済み


Trimming Spaces
Given a string, remove all leading and trailing spaces (where space is defined as ASCII 32). Input a = ' singular value deco...

約3年 前

解決済み


Subset Sum
Given a vector v of integers and an integer n, return the the indices of v (as a row vector in ascending order) that sum to n. I...

約3年 前

さらに読み込む