問題


Find the elements of a matrix according to a defined property.
From A = [5,2,3] and B = [1,2,3,4,5,6,7,8,9,10] produce a vector C where : C(1) is the sum of the first A(1) elements of B, ...

13年以上 前 | 3 | 91 個のソルバー

解決済み


Find the elements of a matrix according to a defined property.
From A = [5,2,3] and B = [1,2,3,4,5,6,7,8,9,10] produce a vector C where : C(1) is the sum of the first A(1) elements of B, ...

13年以上 前

問題


Matrix which contains the values of an other matrix A at the given locations.
If you have two matrices, which together give xc and yc coordinates into another matrix, eg : xc = [1 1 1; 2 2 1]; ...

13年以上 前 | 1 | 239 個のソルバー

解決済み


Matrix which contains the values of an other matrix A at the given locations.
If you have two matrices, which together give xc and yc coordinates into another matrix, eg : xc = [1 1 1; 2 2 1]; ...

13年以上 前

問題


Create a matrix X, where each column is a shifted copy of the vector v
Example : in->v = (1:5)'; 1 2 3 4 5 out-> [1 5 4 3 2;2 1 5 4 3;3 2 1 5 4;4 3 2 1 5;5 4 3 ...

13年以上 前 | 1 | 221 個のソルバー

解決済み


Create a matrix X, where each column is a shifted copy of the vector v
Example : in->v = (1:5)'; 1 2 3 4 5 out-> [1 5 4 3 2;2 1 5 4 3;3 2 1 5 4;4 3 2 1 5;5 4 3 ...

13年以上 前

問題


Duplicate each element of a vector.
for an n-dimensional vector x, the function should return another vector 2n-dimension which each element is repeated twice. Ex...

13年以上 前 | 1 | 634 個のソルバー

解決済み


Duplicate each element of a vector.
for an n-dimensional vector x, the function should return another vector 2n-dimension which each element is repeated twice. Ex...

13年以上 前

問題


First non-zero element in each column
For a given matrix, calculate the index of the first non-zero element in each column. Assuming a column with all elements zero ...

14年弱 前 | 7 | 942 個のソルバー

解決済み


Duplicates
Write a function that accepts a cell array of strings and returns another cell array of strings *with only the duplicates* retai...

14年弱 前

解決済み


Maximum running product for a string of numbers
Given a string s representing a list of numbers, find the five consecutive numbers that multiply to form the largest number. Spe...

14年弱 前

解決済み


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

14年弱 前

解決済み


First N Perfect Squares
*Description* Return the first N perfect squares *Example* input = 4; output = [ 1 4 9 16 ];

14年弱 前

解決済み


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

14年弱 前

解決済み


Swap the first and last columns
Flip the outermost columns of matrix A, so that the first column becomes the last and the last column becomes the first. All oth...

14年弱 前

解決済み


Balanced number
Given a positive integer find whether it is a balanced number. For a balanced number the sum of first half of digits is equal to...

14年弱 前

解決済み


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

14年弱 前

解決済み


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

14年弱 前

解決済み


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

14年弱 前

解決済み


given 3 sides, find area of this triangle
1:3 -> 0; 3:5 -> 6

14年弱 前

解決済み


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

14年弱 前

解決済み


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

14年弱 前

問題


Matrix with different incremental runs
Given a vector of positive integers a (>=0); How does one create the matrix where the ith column contains the vector 1:a(i) poss...

14年弱 前 | 1 | 130 個のソルバー

解決済み


Matrix with different incremental runs
Given a vector of positive integers a (>=0); How does one create the matrix where the ith column contains the vector 1:a(i) poss...

14年弱 前

解決済み


First non-zero element in each column
For a given matrix, calculate the index of the first non-zero element in each column. Assuming a column with all elements zero ...

14年弱 前

解決済み


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

14年弱 前

解決済み


Make a checkerboard matrix
Given an integer n, make an n-by-n matrix made up of alternating ones and zeros as shown below. The a(1,1) should be 1. Example...

14年弱 前

解決済み


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

14年弱 前

解決済み


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

14年弱 前

解決済み


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

14年弱 前

さらに読み込む