Gelöst


Extract leading non-zero digit
<http://en.wikipedia.org/wiki/Benford%27s_law Benford's Law> states that the distribution of leading digits is not random. This...

fast 6 Jahre vor

Gelöst


Trimming Spaces
Given a string, remove all leading and trailing spaces (where space is defined as ASCII 32). Input a = ' singular value deco...

fast 6 Jahre vor

Gelöst


Return a list sorted by number of occurrences
Given a vector x, return a vector y of the unique values in x sorted by the number of occurrences in x. Ties are resolved by a ...

fast 6 Jahre vor

Gelöst


Variance computation (easy edition)
Given a vector x with several values, compute the variance, whose formula is given by: <<https://i.imgur.com/Wg95KBE.gif>> ...

fast 6 Jahre vor

Gelöst


Element-wise vector product
Given two vectors x and y, compute their element-wise product z. Thus, if x = [1 3 5] and y = [0.5 -1 2], then z = [1*0.5...

fast 6 Jahre vor

Gelöst


PEMDAS test
Create the function that will return the following expression for x and y. <<https://i.ibb.co/RHWyzrv/Code-Cogs-Eqn-1.gif>> ...

fast 6 Jahre vor

Gelöst


Median computation (easy edition)
Given a vector of values, compute the median. The median is defined as the middle value in a set of *sorted* data. Thus, if ...

fast 6 Jahre vor

Gelöst


Median computation (challenge edition)
See easy edition of this problem. However, now you must compute the median of any real-valued vector without using the in-built...

fast 6 Jahre vor

Gelöst


Some Assembly Required
The input to this function is a matrix of real numbers. Your job is to assemble the rows of the matrix into one large row that ...

fast 6 Jahre vor

Gelöst


Operate on matrices of unequal, yet similar, size
You may want to add a vector to a matrix, implying that the vector is added to each column of the matrix. Or multiply a 3x4x5 ma...

fast 6 Jahre vor

Gelöst


Removing rows from a matrix is easy - but what about inserting rows?
Assume A is a 5-by-5 matrix. A([2,4],:) = [] is a quick way to remove rows 2 and 4. Can you find a quick way to insert rows into...

fast 6 Jahre vor

Gelöst


The End of the World
given a date -- represent it in the Maya long count system. <https://en.wikipedia.org/wiki/Maya_calendar> <https://maya.nm...

fast 6 Jahre vor

Gelöst


Find the day for a date
Today's day and date will be given to you. By utilising that you need to find the day of the old date. (Date will be in DD/MM/YY...

fast 6 Jahre vor

Gelöst


Lost days
Given two dates in a particular format, calculate the difference between them.

fast 6 Jahre vor

Gelöst


Sum the Infinite Series
Given that 0 < x and x < 2*pi where x is in radians, write a function [c,s] = infinite_series(x); that returns with the...

fast 6 Jahre vor

Gelöst


Find the stride of the longest skip sequence
We define a _skip sequence_ as a regularly-spaced list of integers such as might be generated by MATLAB's <http://www.mathworks....

fast 6 Jahre vor

Gelöst


Square Digits Number Chain Terminal Value (Inspired by Project Euler Problem 92)
Given a number _n_, return the terminal value of the number chain formed by summing the square of the digits. According to the P...

fast 6 Jahre vor

Gelöst


Golomb's self-describing sequence (based on Euler 341)
The Golomb's self-describing sequence {G(n)} is the only nondecreasing sequence of natural numbers such that n appears exactly G...

fast 6 Jahre vor

Gelöst


"Look and say" sequence
What's the next number in this sequence? * [0] * [1 0] * [1 1 1 0] * [3 1 1 0] * [1 3 2 1 1 0] This a variant on the w...

fast 6 Jahre vor

Gelöst


Sum of first n terms of a harmonic progression
Given inputs a, d and n, return the sum of the first n terms of the harmonic progression a, a/(1+d), a/(1+2d), a/(1+3d),....

fast 6 Jahre vor

Gelöst


Integer sequence - 2 : Kolakoski sequence
Get the n-th term of <https://oeis.org/A000002 Kolakoski Sequence>.

fast 6 Jahre vor

Gelöst


N-Dimensional Array Slice
Given an N-dimensional array, _A_, an index, _I_, and a dimension, _d_, return the _I_ th elements of _A_ in the _d_ dimension. ...

fast 6 Jahre vor

Gelöst


Get all prime factors
List the prime factors for the input number, in decreasing order. List each factor. If the prime factor occurs twice, list it as...

fast 6 Jahre vor

Gelöst


Numbers with prime factors 2, 3 and 5.
Make a function which takes one positive integer n and returns a matrix with the numbers of the form (2^i)*(3^j)*(5^k) which are...

fast 6 Jahre vor

Gelöst


Proper Factors
Generate the proper factors of input integer _x_ and return them in ascending order. For more information on proper factors, ref...

fast 6 Jahre vor

Gelöst


Smith numbers
Return true if the input is a Smith number in base ten. Otherwise, return false. Read about Smith numbers at <http://en.wikipedi...

fast 6 Jahre vor

Gelöst


Multiples of a Number in a Given Range
Given an integer factor _f_ and a range defined by _xlow_ and _xhigh_ inclusive, return a vector of the multiples of _f_ that fa...

fast 6 Jahre vor

Gelöst


Binary
Given a positive, integer n, create a function that returns the respective binary number in the form of a vector. Example: ...

fast 6 Jahre vor

Gelöst


Binary Coder
Take an input number and print the binary value of this number.

fast 6 Jahre vor

Gelöst


02 - Vector Variables 5
_eVec_ = _Hello_ ( _eVec_ is a string, which is a vector of characters )

fast 6 Jahre vor

Mehr laden