문제를 풀었습니다


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

2년 초과 전

문제를 풀었습니다


Twist 'n' Match
Given n and m, construct an n-by-n matrix a such that a, when rotated 90 degrees and compared with itself, matches itself in exa...

2년 초과 전

문제를 풀었습니다


Better bullseye matrix
<http://www.mathworks.com/matlabcentral/cody/problems/18-bullseye-matrix Problem 18> asks to create a bullseye matrix like this:...

2년 초과 전

문제를 풀었습니다


Matrix spiral
Make a spiral in a (n*n) matrix. The spiral has to start in the top left, and has to rotate clockwise to the center. The spiral ...

2년 초과 전

문제를 풀었습니다


Spot the rectangle (Part 2)
This problem is related to the <http://bit-player.org/2009/the-17x17-challenge 17x17 challenge>. See also <http://www.mathworks....

2년 초과 전

문제를 풀었습니다


Spot the rectangle
This problem is related to the <http://bit-player.org/2009/the-17x17-challenge 17x17 challenge>. Given a matrix filled with ones...

2년 초과 전

문제를 풀었습니다


Spiral In
Create an m by n matrix filled with sequential integers starting from 1 and arranged in a counterclockwise spiral that hugs the ...

2년 초과 전

문제를 풀었습니다


Longest run of consecutive numbers
Given a vector a, find the number(s) that is/are repeated consecutively most often. For example, if you have a = [1 2 2 2 1 ...

2년 초과 전

문제를 풀었습니다


Construct an index vector from two input vectors in vectorized fashion
Create an index vector defined by two input vectors, one defining the beginnings of one or more index ranges, and the other defi...

2년 초과 전

문제를 풀었습니다


Getting the indices from a matrix
Inspired by Problem 645. Getting the indices from a matrix. Given a matrix A (or a vector), return the indices (always in row...

2년 초과 전

문제를 풀었습니다


Piecewise linear interpolation
Given an Mx2 vector and a row of M-1 integers, output a two column vector that linearly interpolates Y times between each succes...

2년 초과 전

문제를 풀었습니다


Create a patchwork matrix
This function will assemble a large matrix out of a number of smaller ones m1, m2, etc., according to a pattern P. If P is 3x5,...

2년 초과 전

문제를 풀었습니다


Symmetric matrix
You must create a n-by-n *symmetric* matrix such that A(row,col) = row/col for col >= row. Example if n =3 : output is : ...

2년 초과 전

문제를 풀었습니다


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

2년 초과 전

문제를 풀었습니다


"mirror" matrix
Create n x 2n "mirror" matrix of this type: Examples For n = 2 m = [ 1 2 2 1 1 2 2 1 ] For n = 3 m = ...

2년 초과 전

문제를 풀었습니다


Make a Star Pyramid
Create a star pyramid. First line will have 1 star, second will have two stars and so on... a basic program which is easily done...

2년 초과 전

문제를 풀었습니다


Create a Multiplication table matrix...
Create a product table in this format: P = [ 1 2 3 4 5; 2 4 6 8 10; 3 6 9 12 15; 4 8 12 1...

2년 초과 전

문제를 풀었습니다


Make a logical diamond using GALLERY function
Inspired from <http://www.mathworks.com/matlabcentral/cody/problems/1078-make-a-diamond Problem 1078. Make a diamond> In thi...

2년 초과 전

문제를 풀었습니다


Special matrix
Make a square matrix with this shape. For n=4 M = 1 1 0 0 1 0 1 0 0 1 0 ...

2년 초과 전

문제를 풀었습니다


Mirror Image matrix across anti-diagonal
Given an input number x, create a mirror image matrix 'Y' across the anti-diagonal. For example, if x=3, Y = [1 2 3; ...

2년 초과 전

문제를 풀었습니다


Create Volcano (or Atoll) martix. It is an extension of Bullseye matrix problem.
For example, if n=2 (maximum value), the output matrix should be [1 1 1 1 1; 1 2 2 2 1; 1 2 1 2 1; 1 2 2 2 1; 1 1 ...

2년 초과 전

문제를 풀었습니다


Pascal's Matrix
Given an integer n &ge; 0, generate the ( _n_+1) &times; ( _n_+1) lower triangular <http://en.wikipedia.org/wiki/Pascal_matrix P...

2년 초과 전

문제를 풀었습니다


Draw 'D'.
Draw a x-by-x matrix 'D' using 0 and 1. example: x=4 ans= [1 1 1 0 1 0 0 1 1 0 0 1 1 1 1 0]

2년 초과 전

문제를 풀었습니다


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

2년 초과 전

문제를 풀었습니다


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년 초과 전

문제를 풀었습니다


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

2년 초과 전

문제를 풀었습니다


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

2년 초과 전

문제를 풀었습니다


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

2년 초과 전

문제를 풀었습니다


Mandelbrot Numbers
The <http://en.wikipedia.org/wiki/Mandelbrot_set Mandelbrot Set> is built around a simple iterative equation. z(1) = c z...

2년 초과 전

문제를 풀었습니다


QWERTY coordinates
Given a lowercase letter or a digit as input, return the row where that letter appears on a standard U.S. QWERTY keyboard and it...

2년 초과 전

더 보기