已解决


Doubling elements in a vector
Given the vector A, return B in which all numbers in A are doubling. So for: A = [ 1 5 8 ] then B = [ 1 1 5 ...

5 months 前

已解决


Create a vector
Create a vector from 0 to n by intervals of 2.

5 months 前

已解决


Flip the vector from right to left
Flip the vector from right to left. Examples x=[1:5], then y=[5 4 3 2 1] x=[1 4 6], then y=[6 4 1]; Request not to use d...

5 months 前

已解决


Whether the input is vector?
Given the input x, return 1 if x is vector or else 0.

5 months 前

已解决


Find max
Find the maximum value of a given vector or matrix.

5 months 前

已解决


Get the length of a given vector
Given a vector x, the output y should equal the length of x.

5 months 前

已解决


Inner product of two vectors
Find the inner product of two vectors.

5 months 前

已解决


Arrange Vector in descending order
If x=[0,3,4,2,1] then y=[4,3,2,1,0]

5 months 前

已解决


Select every other element of a vector
Write a function which returns every other element of the vector passed in. That is, it returns the all odd-numbered elements, s...

5 months 前

已解决


matrix zigzag
Unfold a 2-D matrix to a 1-D array in zig-zag order, e.g., for matrix [ 1 2 3 ; 4 5 6 ; 7 8 9 ] the resulting 1-...

5 months 前

已解决


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

5 months 前

已解决


Counting in Finnish
Sort a vector of single digit whole numbers alphabetically by their name, in Finnish. See the Wikipedia page for <http://en.wik...

6 months 前

已解决


It dseon't mettar waht oedrr the lrettes in a wrod are.
An internet meme from 2003 (read more here) asserted that readers are relatively insensitive to letter order in words, so long a...

6 months 前

已解决


Word Counting and Indexing
You are given a list of strings, each being a list of words divided by spaces. Break the strings into words, then return a maste...

6 months 前

已解决


Find state names that start with the letter N
Given a list of US states, remove all the states that start with the letter N. If s1 = 'Alabama Montana Nebraska Vermont Ne...

6 months 前

已解决


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

6 months 前

已解决


Crop an Image
A grayscale image is represented as a matrix in MATLAB. Each matrix element represents a pixel in the image. An element value re...

6 months 前

已解决


Remove all the words that end with "ain"
Given the string s1, return the string s2 with the target characters removed. For example, given s1 = 'the main event' your ...

6 months 前

已解决


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

6 months 前

已解决


Replace NaNs with the number that appears to its left in the row.
Replace NaNs with the number that appears to its left in the row. If there are more than one consecutive NaNs, they should all ...

6 months 前

已解决


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

6 months 前

已解决


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

6 months 前

已解决


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

6 months 前

已解决


Find the sum of all the numbers of the input vector
Find the sum of all the numbers of the input vector x. Examples: Input x = [1 2 3 5] Output y is 11 Input x ...

6 months 前

已解决


Add two numbers
Given a and b, return the sum a+b in c.

6 months 前

已回答
Default Path not working - errors fullfile
I know this is an old question, but I found it while trying to solve this same issue on my machine. There was .m file named con...

6 months 前 | 0

已解决


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

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

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

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

7 months 前

加载更多