문제를 풀었습니다


LIFO Validation
Write a function to check whether a LIFO (Last In First Out) restriction on inventory is violated. We have two input vectors ...

10년 초과 전

문제를 풀었습니다


Another colon problem
This is simple problem based on problems 555, 801, 1118, etc. Create an index vector from two input vectors. Example: ...

10년 초과 전

문제를 풀었습니다


Derivative of polynomial
Compute the derivative of a given polynomial. The input is an <http://www.mathworks.com/help/matlab/math/representing-polynomial...

10년 초과 전

문제를 풀었습니다


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

10년 초과 전

문제를 풀었습니다


"Low : High - Low : High - Turn around " -- Create a subindices vector
Let two vectors *lo* and *hi* be given. The job is to create a index vector like so idx = [lo(1):hi(1) lo(2):hi(2) ...]...

10년 초과 전

문제를 풀었습니다


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

10년 초과 전

문제를 풀었습니다


Convert a numerical matrix into a cell array of strings
Given a numerical matrix, output a *cell array of string*. For example: if input = 1:3 output is {'1','2','3'} whic...

10년 초과 전

문제를 풀었습니다


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

10년 초과 전

문제를 풀었습니다


Remove white space from the string
Remove the white spaces (trailing and leading) from the input variable

10년 초과 전

문제를 풀었습니다


Back to basics 25 - Valid variable names
Covering some basic topics I haven't seen elsewhere on Cody. Given a string, return true if it is a valid MATLAB variable nam...

10년 초과 전

문제를 풀었습니다


Additive persistence
Inspired by Problem 2008 created by Ziko. In mathematics, the persistence of a number is the *number of times* one must apply...

10년 초과 전

문제를 풀었습니다


The prisoner
"We want information, information, information." "Who are you?" Input can be a string or a number (array).

10년 초과 전

문제를 풀었습니다


Diagonal & Anti-Diagonal Matrix: Easy
Create a matrix as shown below from "magic" square. For example: if input x=9;then use mgic(x) and create the matrix...

10년 초과 전

문제를 풀었습니다


Prime Time
All you need to do here is submit your solution a prime number of seconds after the top of the hour. Any hour at all... Easy, ...

10년 초과 전

문제를 풀었습니다


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

10년 초과 전

문제를 풀었습니다


CONVERT TAN TO SIN
In a right angle triangle ABC given the tan(A) then find sin(A) For example tan(A)=3/4 then sin(A)=3/5

10년 초과 전

문제를 풀었습니다


Dice face matrix!
This is dice simulator, but instead of making a random die number, you will receive an "pre-rolled" number in and spit out a mat...

10년 초과 전

문제를 풀었습니다


convert?
* Given a string containing a number followed by pounds or kgs, for example: * 'Billy lost 22 pounds in four weeks.' * 'Maria ...

10년 초과 전

문제를 풀었습니다


Numeric array to cell array of strings (easy)
Given a numeric array (A) and a 1xk cell array of strings (C), return a cell array (B) that is the same size as A and in which e...

10년 초과 전

문제를 풀었습니다


COUNT VOWEL
Count, how many times vowels occurred. EXAMPLE: x='string the MaTLaBiAn' then the answer will be 6. x='coUnt the vowEl' th...

10년 초과 전

문제를 풀었습니다


Generate a string like abbcccddddeeeee
This is the string version of Problem 1035. <http://www.mathworks.com/matlabcentral/cody/problems/1035-generate-a-vector-like-1-...

10년 초과 전

문제를 풀었습니다


Mode
Find the mode of the vector Assumption: no vector is bimodal Example 1: input=[1 2 3 4 4]; output=4 Example 2: input=[7...

10년 초과 전

문제를 풀었습니다


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

10년 초과 전

문제를 풀었습니다


COUNT VOWEL 2
The objective of this problem is to determine the number of unique vowels used in the given string. Now count vowels in STRI...

10년 초과 전

문제를 풀었습니다


Make a vector of prime numbers
Input(n) - length of vector with prime numbers Output(v) - vector of prime numbers Example: * n=1; v=2 * n=3; v=[2 3 5...

10년 초과 전

문제를 풀었습니다


Find out the best cricketer
Irrespective of input, return Sachin Tendulkar as a output

10년 초과 전

문제를 풀었습니다


Number of odd and even elements within matrix
Input(m) - any matrix with integers Output(n) - n(1)=number of odd elements, n(2)=number of even elements Example: * m=...

10년 초과 전

문제를 풀었습니다


ベクトルのスケーリング
入力したベクトルの大きさを1にしてください。

10년 초과 전

문제를 풀었습니다


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

10년 초과 전

문제를 풀었습니다


How many days does the cat take to climb out of the hole?
A cat accidentally falls down a hole with sloping but rough sides. It can climb out of the hole of height h metres, but for ever...

10년 초과 전

더 보기