문제를 풀었습니다


Toeplitz Matrix
For a given square matrix of order n-by-n check whether this is a Toeplitz matrix or not. Return true if it is.

대략 6년 전

문제를 풀었습니다


Generate this matrix
Generate the following matrix. n = 2; out = [-4 -3 -2 -1 0 -3 -2 -1 0 1 -...

대략 6년 전

문제를 풀었습니다


The Matrix Construction
Given two input ,first one is CN (Column Number), Second one is Dim Can you produce such a matrix for example CN=6; Dim=2 ...

대략 6년 전

문제를 풀었습니다


Sort rows of a matrix
Sort rows of matrix A in an ascending order according to the last column Example input: A = [1 2 3;7 8 9;4 5 6]; Exam...

대략 6년 전

문제를 풀었습니다


Vector to 3-Column Matrix
Consider a vector *A* such as A = [1 2 3 3 4 5 6] Can you convert this vector to a three-column matrix like this: ...

대략 6년 전

문제를 풀었습니다


Find the maximum two numbers of every column of a matrix
Find the maximum two numbers of every column of a matrix. Example: If we input a matrix A = [ 1 2 4 6 0 3 ...

대략 6년 전

문제를 풀었습니다


Nonuniform quantizer as a piecewise constant function
Implement a nonuniform quantizer as the following piecewise function: y = -3.5, x < -3 y = -1.5, -3 &#8804; x < -1 y = ...

대략 6년 전

문제를 풀었습니다


Alternating sum
Given vector x, calculate the alternating sum y = x(1) - x(2) + x(3) - x(4) + ...

대략 6년 전

문제를 풀었습니다


Get a new matrix by mapping each element of an arbitrary-sized input matrix using lookup table
A is a matrix of any size and dimension. Each element of matrix A belongs to a set S of integers. B is a 2-D matrix defining out...

대략 6년 전

문제를 풀었습니다


Count ones
Write a program to count number of ones (1s) in an integer variable input. For example: Input x=2200112231 output y=3 I...

대략 6년 전

문제를 풀었습니다


Do Fast Fourier Transformation
Example Fast Fourier Transformation from vector [2,1]) ans = 3 1

대략 6년 전

문제를 풀었습니다


Back to basics - mean of corner elements of a matrix
Calculate the mean of corner elements of a matrix. e.g. a=[1 2 3; 4 5 6; 7 8 9;] Mean = (1+3+7+9)/4 = 5

6년 초과 전

문제를 풀었습니다


Toeplitize a matrix
Similar to <http://www.mathworks.com/matlabcentral/cody/problems/3094-hankelize-a-matrix Problem 3094. Hankelize a matrix>, now ...

6년 초과 전

문제를 풀었습니다


Go to the head of the class!
You're given a matrix and a single number. If that number is in the matrix, reorder the matrix so that number is in the first r...

6년 초과 전

문제를 풀었습니다


Sum of odd numbers in a matrix
Find the sum of all the odd numbers in a matrix. Example x = [2 3 5 7 1 4 11] y = 27

6년 초과 전

문제를 풀었습니다


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

6년 초과 전

문제를 풀었습니다


Remove the air bubbles from a vector
_*A reduced version of Problem 112*_ Given a column vector v, return a vector w in which all the zeros have "bubbled" to the ...

6년 초과 전

문제를 풀었습니다


Replace Nonzero Numbers with 1
Given the matrix x, return the matrix y with non zero elements replaced with 1. Example: Input x = [ 1 2 0 0 0 ...

6년 초과 전

문제를 풀었습니다


Write a function man that takes a row vector v and returns a matrix H as follows..
Write a function called man that takes a row vector v as an input and returns a matrix H whose first column consist of the eleme...

6년 초과 전

문제를 풀었습니다


Remove entire row and column in the matrix containing the input values
Remove the entire row and column from the matrix containing specific values. The specified value can be a scalar or a vector. Fo...

6년 초과 전

문제를 풀었습니다


Matrix multiplication across rows
Given matrix m, return matrix n such that, rows of n are result of multiplication of the rows of the input matrix Example ...

6년 초과 전

문제를 풀었습니다


subtract central cross
Given an n-by-n square matrix, where n is an odd number, return the matrix without the central row and the central column.

6년 초과 전

문제를 풀었습니다


frame of the matrix
Given the matrix M, return M without the external frame.

6년 초과 전

문제를 풀었습니다


Given a 4x4 matrix, swap the two middle columns
If a = [1 2 3 4; 1 2 3 4; 1 2 3 4; 1 2 3 4]; then the result is ans = 1 3 2 4 1 3 2...

6년 초과 전

문제를 풀었습니다


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

6년 초과 전

문제를 풀었습니다


Enlarge array
Given an m-by-n numeric array (A) and a 1-by-2 vector (sz) indicating the dimensions [p q] to enlarge each element, return an (m...

6년 초과 전

문제를 풀었습니다


Removing rows from a matrix is easy - but what about inserting rows?
Assume A is a 5-by-5 matrix. A([2,4],:) = [] is a quick way to remove rows 2 and 4. Can you find a quick way to insert rows into...

6년 초과 전

문제를 풀었습니다


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

6년 초과 전

문제를 풀었습니다


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

6년 초과 전

문제를 풀었습니다


Determine whether a vector is monotonically increasing
Return true if the elements of the input vector increase monotonically (i.e. each element is larger than the previous). Return f...

6년 초과 전

더 보기