문제를 풀었습니다


Generate a vector like 1,2,2,3,3,3,4,4,4,4
Generate a vector like 1,2,2,3,3,3,4,4,4,4 So if n = 3, then return [1 2 2 3 3 3] And if n = 5, then return [1 2 2...

12년 초과 전

문제를 풀었습니다


Usage of varargout
This Challenge is to demonstrate usage of varargout. Output a cell array using varargout of magic squares of size 1 thru n. ...

대략 13년 전

문제를 풀었습니다


Array GCD
* Find Greatest Common Divisor in a given array * Function Template: function ans = arraygcd(a) % a=[45 15 200 ...

대략 13년 전

문제를 풀었습니다


Become the leader
The goal of this problem is the same as the goal of the rest of them: *become the leader*. Actually, you can only solve this ...

대략 13년 전

문제를 풀었습니다


Global usage
This Challenge is to utilize Global variables. Global variables are risky as the subroutine may inadvertently and unwantingly...

대략 13년 전

문제를 풀었습니다


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

대략 13년 전

문제를 풀었습니다


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

대략 13년 전

문제를 풀었습니다


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

대략 13년 전

문제를 풀었습니다


Determine if input is a Narcissistic number
<http://en.wikipedia.org/wiki/Narcissistic_number Narcissistic number> is a number that is the sum of its own digits each raised...

대략 13년 전

문제를 풀었습니다


Cell Source Index
Suppose that C is a cell array whose elements consist of row vectors of elements of the same type. For example, C could be a ce...

대략 13년 전

문제를 풀었습니다


Determine if input is a perfect number
A <http://en.wikipedia.org/wiki/Perfect_number/ perfect number> occurs whent the sum of all divisors of a positive integer, exce...

대략 13년 전

문제를 풀었습니다


Doubling elements in a vector
Given the vector A, return B in which all numbers in A are doubling. So for: A = [ 1 5 8 ] then B = [ 1 1 5 ...

대략 13년 전

문제를 풀었습니다


Divisors of an integer
Given a number N, return a vector V of all integers that divide N. For example, N = 10 Then V=[1 2 5 10]

대략 13년 전

문제를 풀었습니다


Assign numerical values to a structure with 1 field
The aim is to assign values to a multidimensional structure *without using for-loop or while-loop* Example with a structure ...

대략 13년 전

문제를 풀었습니다


Compute the dilation of a binary image
A basic operation in image analysis is the dilation. Given an image where each pixel is either on or off (black/white, true/fals...

대략 13년 전

문제를 풀었습니다


Community Problem 500!
In honor of this being the 500th Community problem, see if you can create a function that has a Cody size of 500. It can do any...

대략 13년 전

문제를 풀었습니다


R2012b atan in Degrees
Return in degrees the atan result of inputs for all four quadrants. *Examples:* [x, y] Degrees 1 0 0 1 1 ...

대략 13년 전

문제를 풀었습니다


Find a subset that divides the vector into equal halves
Given a vector x, return the indices to elements that will sum to exactly half of the sum of all elements. Example: Inpu...

13년 초과 전

문제를 풀었습니다


Flag largest magnitude swings as they occur
You have a phenomenon that produces strictly positive or negative results. delta = [1 -3 4 2 -1 6 -2 -7]; Marching thr...

13년 초과 전

문제를 풀었습니다


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

13년 초과 전

문제를 풀었습니다


Vector LCM
* Find Least Common Multiple of a given vector. * Need general solution as the test suite will be expanded. * Function Templa...

13년 초과 전

문제를 풀었습니다


Find the list of all open files
In the test suite, I use <http://www.mathworks.com/help/matlab/ref/fopen.html fopen> to create new files. The task is to find th...

13년 초과 전

문제를 풀었습니다


Unique values without using UNIQUE function
You must return unique values in a vector in *stable* mode without using the unique function. About stable order flag: ...

13년 초과 전

문제를 풀었습니다


Find nearest prime number less than input number
Find nearest prime number less than input number . For example: if the input number is 125, then the nearest prime number whi...

13년 초과 전

문제를 풀었습니다


Set a diagonal
Given a matrix M, row vector v of appropriate length, and diagonal index d (where 0 indicates the main diagonal and off-diagonal...

13년 초과 전

문제를 풀었습니다


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

13년 초과 전

문제를 풀었습니다


Get the elements of diagonal and antidiagonal for any m-by-n matrix
In the problem <http://www.mathworks.com/matlabcentral/cody/problems/858-permute-diagonal-and-antidiagonal Problem 858. Permute ...

13년 초과 전

문제를 풀었습니다


Cody Computer Part 5 - Guess the Name of Cody Computer
Network computers have generally a nickname to be identified. Can you guess the nickname of the Cody Computer? No inpu...

13년 초과 전

문제를 풀었습니다


intersection of matrices
Given two matrices filled with ones and zeros, determine if they share a common row, column entry. These matrices are of identi...

13년 초과 전

문제를 풀었습니다


How many monitors are connected ?
How to obtain the numbers of monitors connected to your computer ?

13년 초과 전

더 보기