Feeds
문제를 풀었습니다
Compress strings (not springs)
Please remove excess space, limit one space between others, and no space before punctuation marks. * For example, 'Trendy , ...
거의 5년 전
문제를 풀었습니다
Use of regexp
Given a string, containing several sentences, such as: 'I played piano. John played football. Anita went home. Are you safe?...
거의 5년 전
문제를 풀었습니다
Number of 1s in a binary string
Find the number of 1s in the given binary string. Example. If the input string is '1100101', the output is 4. If the input stri...
거의 5년 전
문제를 풀었습니다
Return the first and last character of a string
Return the first and last character of a string, concatenated together. If there is only one character in the string, the functi...
거의 5년 전
문제를 풀었습니다
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....
거의 5년 전
문제를 풀었습니다
Without the French accent please!
Suppress the French accent. Example 'Déjà présent' -> 'Deja present'
거의 5년 전
문제를 풀었습니다
Add more zeros
Find code that adds one 0 to each sequence of 0 in a string (composed with only 0 or 1). For example: '1010' -> '100100' ...
거의 5년 전
문제를 풀었습니다
Ordinal numbers
Given an integer n, return the corresponding ordinal number as a character string. For example, ord(1)='1st' ord(2)=...
거의 5년 전
문제를 풀었습니다
Split a string into chunks of specified length
Given a string and a vector of integers, break the string into chunks whose lengths are given by the elements of the vector. Ex...
거의 5년 전
문제를 풀었습니다
Cell Counting: How Many Draws?
You are given a cell array containing information about a number of soccer games. Each cell contains one of the following: * ...
거의 5년 전
문제를 풀었습니다
Guess Cipher
Guess the formula to transform strings as follows: 'Hello World!' --> 'Ifmmp Xpsme!' 'Can I help you?' --> 'Dbo J ifmq zpv...
거의 5년 전
문제를 풀었습니다
Decimation
When dealing to the Roman Army, the term decimate meant that the entire unit would be broken up into groups of ten soldiers, and...
대략 5년 전
문제를 풀었습니다
Find nth maximum
Find nth maximum in a vector of integer numbers. Return NaN if no such number exists. x = [2 6 4 9 -10 3 1 5 -10]; So ...
대략 5년 전
문제를 풀었습니다
Index of a Rational number
The set of real numbers are infinite. They are so many that real numbers can't even be enumerated. However, unlike real numbers ...
대략 5년 전
문제를 풀었습니다
return row and column indices given 2 values which define a range
Inspired by problem <http://www.mathworks.co.kr/matlabcentral/cody/problems/856-getting-the-indices-from-a-matrice> Inputs: - ...
대략 5년 전
문제를 풀었습니다
Finding neighbors of [-1:1] in a matrix....
Hello All! Well I found this one fun to figure out, all you have to do is make a matrix of 1's or 0's (true or false) that sh...
대략 5년 전
문제를 풀었습니다
Largest territory
Determine whose territory is largest. If there are multiple numbers tied for the largest territory, return the smallest number. ...
5년 초과 전
문제를 풀었습니다
compress sequence into intervals
You're given a row vector of monotonically increasing integers most of which are consecutive. Find the upper and lower bounds of...
5년 초과 전
문제를 풀었습니다
Times 2 - START HERE
Try out this test problem first. Given the variable x as your input, multiply it by two and put the result in y. Examples:...
5년 초과 전
문제를 풀었습니다
expand intervals vol.3
This is the next problem after <http://www.mathworks.co.uk/matlabcentral/cody/problems/2528 2528> and <http://www.mathworks.co.u...
5년 초과 전
문제를 풀었습니다
remove single elements
Given a vector of integers, remove the elements that have appeared only once. The output elements should be in exact order as th...
5년 초과 전
문제를 풀었습니다
expand intervals vol.2
Similar to problem <http://www.mathworks.co.uk/matlabcentral/cody/problems/2528 2528>. This is a more general case, when bounds ...
5년 초과 전
문제를 풀었습니다
Getting the indices from a vector
This is a basic MATLAB operation. It is for instructional purposes. --- You may already know how to <http://www.mathworks....
5년 초과 전
문제를 풀었습니다
Three...is a magic number.
Yes it is... It's a magic number... To help you get rid of that earworm, here's a new Cody problem. You are given a squar...
5년 초과 전
문제를 풀었습니다
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 ...
5년 초과 전
문제를 풀었습니다
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
5년 초과 전
문제를 풀었습니다
Number of Even Elements in Fibonacci Sequence
Find how many even Fibonacci numbers are available in the first d numbers. Consider the following first 14 numbers 1 1 2...
5년 초과 전
문제를 풀었습니다
expand intervals
You're given a row vector of an even number of monotonically increasing integers. Each pair of consecutive integers is the lower...
거의 6년 전
문제를 풀었습니다
Replace pattern 0 1 0 and 1 0 1
Find and replace a pattern in a row of zeroes and ones. * Find 1 0 1 and replace it with 1 1 1 * Find 0 1 0 and replace it w...
거의 6년 전
문제를 풀었습니다
How unique?
Sometimes, when we check unique entries of vector we would like to know how many times each value occurs. Given vector of num...
거의 6년 전