문제를 풀었습니다


Find the average of a random sequance
Write a function that generates random integers within a loop, and calculates the mean of the positive numbers only. At each ...

거의 5년 전

문제를 풀었습니다


Find best domino orientation
Given a list of pairs, find the orientation they should be placed in a line, such that the sum of the absolute values of the dif...

거의 5년 전

문제를 풀었습니다


Find best placement for ordered dominoes (harder)
Given a list of ordered pairs, find the order they should be placed in a line, such that the sum of the absolute values of the d...

거의 5년 전

문제를 풀었습니다


Find perfect placement of non-rotating dominoes (easier)
Given a list of ordered pairs, find the order they should be placed in a line, such that the sum of the absolute values of the d...

거의 5년 전

문제를 풀었습니다


Tic Tac Toe FTW
Given a tic tac toe board: * 1 represents X * 0 represents empty. * -1 represents O It is X's move. If there is an imme...

거의 5년 전

문제를 풀었습니다


Consecutive Equation Times (of the day)
Many times throughout the day can represent mathematical equations. In this problem, we focus on the largest consecutive run of ...

거의 5년 전

문제를 풀었습니다


Digital Neighbourhood
Given a natural number reorder its digits to create another number, closest to the given one. Examples: * 123 gives 132, ...

거의 5년 전

문제를 풀었습니다


With apologies to William Blake
Coder Coder, typing fast Sitting at your desk, aghast. What immortal MATLAB script will solve this problem, nice and qu...

거의 5년 전

문제를 풀었습니다


Big numbers, repeated least significant digits
This problem builds off of <http://www.mathworks.com/matlabcentral/cody/problems/3077-big-numbers-least-significant-digits/ Prob...

거의 5년 전

문제를 풀었습니다


Big numbers, least significant digits
Given two numbers, x and n, return the last d digits of the number that is calculated by x^n. In all cases, d will be the number...

거의 5년 전

문제를 풀었습니다


Find similar sequences
Another problem inspired by a question on the <http://www.mathworks.com/matlabcentral/answers answers> forum. Given a matrix ...

거의 5년 전

문제를 풀었습니다


Largest Geometric Series
Extension of Ned Gulley's wonderful <http://www.mathworks.com/matlabcentral/cody/problems/317 Problem 317>. In a geometric se...

거의 5년 전

문제를 풀었습니다


Back to basics 24 - Symbolic variables
Covering some basic topics I haven't seen elsewhere on Cody. Given a string algebraic expression, return the symbolic variabl...

거의 5년 전

문제를 풀었습니다


arithmetic progression
I've written a program to generate the first few terms of <https://en.wikipedia.org/wiki/Arithmetic_progression arithmetic progr...

거의 5년 전

문제를 풀었습니다


geometric progression
I've modified my <http://uk.mathworks.com/matlabcentral/cody/problems/2800-arithmetic-progression previous program> so that it n...

거의 5년 전

문제를 풀었습니다


Approximation of Pi (vector inputs)
Pi (divided by 4) can be approximated by the following infinite series: pi/4 = 1 - 1/3 + 1/5 - 1/7 + ... For a given numbe...

거의 5년 전

문제를 풀었습니다


Generate Square Wave
Generate a square wave of desired length, number of complete cycles and duty cycle. Here, duty cycle is defined as the fraction ...

거의 5년 전

문제를 풀었습니다


Find matching parenthesis
One of the most indispensable things about a great text editor for programming is the ability to quickly jump between matching p...

거의 5년 전

문제를 풀었습니다


Calculate a modified Levenshtein distance between two strings
Inspired by the Cody problem found <http://www.mathworks.com/matlabcentral/cody/problems/93-calculate-the-levenshtein-distance-b...

거의 5년 전

문제를 풀었습니다


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

거의 5년 전

문제를 풀었습니다


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

거의 5년 전

문제를 풀었습니다


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

거의 5년 전

문제를 풀었습니다


English to Pig Latin Translator
Pig latin is a faux-language based off of English. The rules are as follows (excerpted from the wikipedia entry for Pig Latin): ...

거의 5년 전

문제를 풀었습니다


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

거의 5년 전

문제를 풀었습니다


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

거의 5년 전

문제를 풀었습니다


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

거의 5년 전

문제를 풀었습니다


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

거의 5년 전

문제를 풀었습니다


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

거의 5년 전

문제를 풀었습니다


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

거의 5년 전

문제를 풀었습니다


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

거의 5년 전

더 보기