Gelöst


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

mehr als 10 Jahre vor

Gelöst


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

mehr als 10 Jahre vor

Gelöst


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

mehr als 10 Jahre vor

Gelöst


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

mehr als 10 Jahre vor

Gelöst


"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) ...]...

mehr als 10 Jahre vor

Gelöst


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

mehr als 10 Jahre vor

Gelöst


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

mehr als 10 Jahre vor

Gelöst


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

mehr als 10 Jahre vor

Gelöst


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

mehr als 10 Jahre vor

Gelöst


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

mehr als 10 Jahre vor

Gelöst


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

mehr als 10 Jahre vor

Gelöst


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

mehr als 10 Jahre vor

Gelöst


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

mehr als 10 Jahre vor

Gelöst


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

mehr als 10 Jahre vor

Gelöst


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

mehr als 10 Jahre vor

Gelöst


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

mehr als 10 Jahre vor

Gelöst


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

mehr als 10 Jahre vor

Gelöst


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

mehr als 10 Jahre vor

Gelöst


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

mehr als 10 Jahre vor

Gelöst


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

mehr als 10 Jahre vor

Gelöst


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

mehr als 10 Jahre vor

Gelöst


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

mehr als 10 Jahre vor

Gelöst


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.

mehr als 10 Jahre vor

Gelöst


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

mehr als 10 Jahre vor

Gelöst


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

mehr als 10 Jahre vor

Gelöst


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

mehr als 10 Jahre vor

Gelöst


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

mehr als 10 Jahre vor

Gelöst


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

mehr als 10 Jahre vor

Gelöst


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

mehr als 10 Jahre vor

Gelöst


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

mehr als 10 Jahre vor

Mehr laden