문제를 풀었습니다


Numbers spiral diagonals (Part 1)
Inspired by Project Euler n°28 et 58. A n x n spiral matrix is obtained by starting with the number 1 and moving to the right...

11년 초과 전

문제를 풀었습니다


Red tracking Object Help
The code works perfectly for pure red extract.I have a problem with the colour.I need it to be different. % Get the snapsho...

11년 초과 전

문제를 풀었습니다


counting groups!
This problem is about counting groups. Example If you have x: x = [0.8 0.8 0.8 0.3 0.3 0.4 0.5 0.6 0.6 0.9] then a...

11년 초과 전

문제를 풀었습니다


Possible Outcomes of American Roulette
The payout for American roulette can be calculated by: payout = (38/n)-1 where n is the number of squares the bet covers. ...

11년 초과 전

문제를 풀었습니다


Rosenbrock's Banana Function and its derivatives
Write a function to return the value of <http://en.wikipedia.org/wiki/Rosenbrock_function Rosenbrock's two-dimensional banana fu...

11년 초과 전

문제를 풀었습니다


Number Persistence
A number's persistence is the number of steps required to reduce it to a single digit by multiplying all its digits to obtain a ...

11년 초과 전

문제를 풀었습니다


Cumulative difference
Given an array, return the cumulative difference. Example a = [ 1 3 5 7 ] cumdiff = [ 1 2 1 -2 ]

11년 초과 전

문제를 풀었습니다


Local Minima
Given a vector of data x, find the values of local minimum that is smaller than its neighbor elements. For example, if x =...

11년 초과 전

문제를 풀었습니다


Create incremental spiral WITHOUT USING EVAL or FEVAL
Constructions that use feval or eval are used to cheat with cody. This test-suite tries to avoid that trick. The goal of this...

11년 초과 전

문제를 풀었습니다


Make a diamond
Given n, odd number > 1, return n by n matrix consist of "null" and "*" characters arranged like a diamond. No toolbox funct...

11년 초과 전

문제를 풀었습니다


Sum Rows
Sum the same indexed (unique) rows. Examine the test suite. Related Challenge - <http://www.mathworks.com/matlabcentral/cody/...

11년 초과 전

문제를 풀었습니다


Narcissistic number ?
Inspired by Problem 2056 created by Ted. In recreational number theory, a narcissistic number is a number that is the sum of ...

11년 초과 전

문제를 풀었습니다


Negation the hard way
Write a function that has the following property: f(f(x)) = -x for any numeric array x. Note that there is no restriction on ...

11년 초과 전

문제를 풀었습니다


Minefield Sonar
*Background* In mine-hunting games (e.g. Microsoft Minesweeper), the user is provided with a covered grid that, upon a left c...

11년 초과 전

문제를 풀었습니다


Simulating the selection of a state with given probabilities
Lets say we have 3 different states [1,2,3] with the probabilities of occurrences of each state is given as [0.5 0.2 0.3]. Which...

11년 초과 전

문제를 풀었습니다


Sort the vector with the given index
Given x = [1 2 4 8 17] and t = [1 3 2 5 4] then y = [1 4 2 17 8].

11년 초과 전

문제를 풀었습니다


Find the longest match inside two strings
Given two strings, find the longest string which is contained within both strings. e.g. the longest string that is contained ...

11년 초과 전

문제를 풀었습니다


Fill an array given a sum and array length values
Fill an array with random numbers so that their sum and array length will be equal to the given values as input. Function will ...

11년 초과 전

문제를 풀었습니다


What day is it?
Tell me what day is it. Return the full name of the day of the week as a string. e.g. It's June 12th 2014, so your function s...

11년 초과 전

문제를 풀었습니다


Method of Common Differences part-2
This is the inverse problem to <http://www.mathworks.com/matlabcentral/cody/problems/1485 Problem 1485>. Problem 1485 illustra...

11년 초과 전

문제를 풀었습니다


Disjunctive Normal Form
This problem is the companion to Problem <http://www.mathworks.com/matlabcentral/cody/problems/1484 1484>. In Boolean logic, a f...

11년 초과 전

문제를 풀었습니다


Integer Sequence - 1
Check the test suite to determine the relationship between input integer scalar and output integer scalar.

11년 초과 전

문제를 풀었습니다


Sum of the Matrix Elements
Add up all the elements in a NxM matrix where N signifies the number of the rows and M signifies the number of the columns. E...

11년 초과 전

문제를 풀었습니다


Find the right x in a 1. order Polynomal (y = m*x+c)
Given two points in a Cartesian coordinate system, find the x-value, where polynomial of 1. order (y = m*x+c) is equal to a giv...

11년 초과 전

문제를 풀었습니다


Sort (high on middle, low on ends)
Sort the vector of numbers in order low-high-low. Even numbers appear in ascending order on the left and odd numbers appear in d...

11년 초과 전

문제를 풀었습니다


Usage of mkdir and copyfile
This Challenge is to copy a file into a new directory multiple levels below existing directory architecture. System appears ...

11년 초과 전

문제를 풀었습니다


Numbers in extended form
Shhhhhhh. Don't tell my daddy, but I'm borrowing his Cody account so all of you very smart people can help me out. I just star...

11년 초과 전

문제를 풀었습니다


Find the position of last minimum value in an integer array with numbers
If x = [2 6 4 9 -10 3 1 5 -10] then the output should be 9, because last minimum value (-10) lies at the 9th position.

11년 초과 전

문제를 풀었습니다


Convert this color - RGB Vector to Hex String
Given a 3 element RGB vector corresponding to a color (given by the MATLAB color spec <http://www.mathworks.com/help/matlab/ref/...

11년 초과 전

문제를 풀었습니다


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

11년 초과 전

더 보기