문제를 풀었습니다


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

대략 7년 전

문제를 풀었습니다


Must be in the front row...
You are given a matrix followed by a single number. Your object is to write a script that will shift the matrix around so that ...

대략 7년 전

문제를 풀었습니다


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

대략 7년 전

문제를 풀었습니다


Too Many Zeros, Dump Them!
Sometimes when I create a matrix, I use this syntax: a = zeros(1000,1000); But when the function ends, I find that I don'...

대략 7년 전

문제를 풀었습니다


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

대략 7년 전

문제를 풀었습니다


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

대략 7년 전

문제를 풀었습니다


A matrix of extroverts
Now that the introverts have had their script, the extroverts spoke up (naturally!) and demanded one as well. You will be given...

대략 7년 전

문제를 풀었습니다


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

대략 7년 전

문제를 풀었습니다


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

대략 7년 전

문제를 풀었습니다


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

대략 7년 전

문제를 풀었습니다


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

대략 7년 전

문제를 풀었습니다


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.

대략 7년 전

문제를 풀었습니다


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

대략 7년 전

문제를 풀었습니다


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

대략 7년 전

문제를 풀었습니다


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

대략 7년 전

문제를 풀었습니다


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

대략 7년 전

문제를 풀었습니다


Operate on matrices of unequal, yet similar, size
You may want to add a vector to a matrix, implying that the vector is added to each column of the matrix. Or multiply a 3x4x5 ma...

대략 7년 전

문제를 풀었습니다


Compress strings (not springs)
Please remove excess space, limit one space between others, and no space before punctuation marks. * For example, 'Trendy , ...

대략 7년 전

문제를 풀었습니다


Find mistyped words in text (mixed-up letters)
Mistyped words are a regular occurrence in emails, texts, status updates, and the like. Many times, people send or post a second...

대략 7년 전

문제를 풀었습니다


QWERTY Shift Encoder
Encode a string using the QWERTY shift code. This code is where you touch type but are offset by one character to the right. ...

대략 7년 전

문제를 풀었습니다


QWERTY Shift Code Decoder
Decode a string encoded using the QWERTY shift code. QWERTY shift code is where the message was touch typed but with an offse...

대략 7년 전

문제를 풀었습니다


Bang Bang in Bangalore
Imagine a strange language disorder, Bangolangosis, has developed among trigonometricians of <http://en.wikipedia.org/wiki/Banga...

대략 7년 전

문제를 풀었습니다


Decimal Comparison
*Background* A utility of particular interest to Cody and other MATLAB ventures is comparing the equality of two numbers. In ...

대략 7년 전

문제를 풀었습니다


Without french accent please !
Suppress french accent For example 'Déjà présent' -> 'Deja present'

대략 7년 전

문제를 풀었습니다


Ordinal numbers
Given an integer n, return the corresponding ordinal number as a character string. For example, ord(1)='1st' ord(2)=...

대략 7년 전

문제를 풀었습니다


Formatting currency numbers
Given a number, format it properly for textual display using the notation $xxx,xxx,xxx.xx. Assume that no more than two digits ...

대략 7년 전

문제를 풀었습니다


Transposition as a CIPHER
This all about transcripting a text message. If the input string is: *s1 = 'My name is Sourav Mondal'*, then the output is: *s2...

대략 7년 전

문제를 풀었습니다


Convert a structure into a string
Convert the contents of each fields into a string. Example with an input structure s with 2 fields : s.age = '33' s....

대략 7년 전

문제를 풀었습니다


Use of regexp
Given a string, containing several sentences, such as: 'I played piano. John played football. Anita went home. Are you safe?...

대략 7년 전

문제를 풀었습니다


Convert String to Morse Code
Convert a given string to international <http://en.wikipedia.org/wiki/Morse_code Morse Code> * Strings will only have [A-z], ...

대략 7년 전

더 보기