Solved


Gray Image

3 years ago

Solved


Sort a vector

3 years ago

Solved


Tridiagonal
Return an n-by-n matrix that has a, b, c as the subdiagonal, main diagonal, and superdiagonal entries in the matrix. Example ...

3 years ago

Solved


Taxi vs Euclides

3 years ago

Solved


Sum multiples

3 years ago

Solved


Taxicab distance

3 years ago

Solved


return row and column indices given 2 values which define a range
Inspired by problem <http://www.mathworks.co.kr/matlabcentral/cody/problems/856-getting-the-indices-from-a-matrice> Inputs: - ...

3 years ago

Solved


Replace pattern 0 1 0 and 1 0 1
Find and replace a pattern in a row of zeroes and ones. * Find 1 0 1 and replace it with 1 1 1 * Find 0 1 0 and replace it w...

3 years ago

Solved


remove single elements
Given a vector of integers, remove the elements that have appeared only once. The output elements should be in exact order as th...

3 years ago

Solved


Generate one sample of uniform random numbers between -pi and +pi
Generate one sample of uniform random numbers between -pi and +pi.

3 years ago

Solved


newRMS
find root mean square of a signal x in less time than the test code and accurate to six places.

3 years ago

Solved


cos for boss?
a programmer had too much coffee and his boss needs cos(alpha+beta) correctly, especially when alpha or beta are close to pi/2 a...

3 years ago

Solved


area of an annulus
Given the diameter d of the inner circle of the annulus. Given length z of a chord of the outer circle of the annulus. This chor...

3 years ago

Solved


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

3 years ago

Solved


Given n, create n random numbers such that their standard deviation is also n.
Given n, create n random numbers such that their standard deviation is also n.

3 years ago

Solved


Volume of this donut
Given hole diameter a, and outermost diameter b, determine the volume y of the resulting donut.

3 years ago

Solved


Toolbox check part 3
In my ongoing quest to highlight obscure parts of MATLAB, the latest challenge is to take 2 string inputs, one a MATLAB toolbox ...

3 years ago

Solved


Back to basics 16 - byte order
Covering some basic topics I haven't seen elsewhere on Cody. Switch the byte order of the input (i.e. if little-endian -> big...

3 years ago

Solved


Count from 0 to N^M in base N.
Return an array of numbers which (effectively) count from 0 to N^M-1 in base N. The result should be returned in a matrix, with ...

3 years ago

Solved


Fix the last element of a cell array
Note: this is lifted directly from <http://www.mathworks.com/matlabcentral/answers/82825-puzzler-for-a-monday Puzzler for a Mond...

3 years ago

Solved


Wheat on a chessboard pt 1
If a chessboard were to have wheat placed upon each square such that one grain were placed on the first square and each successi...

3 years ago

Solved


commutative?
Given the handle to a binary function that takes two ordinary numbers, test if the function is commutative.

3 years ago

Solved


Find out value of polynomial at different value.
Find out value of polynomial at different value. Example p(s) = s + 8 For s=0, value is 8.

3 years ago

Solved


Find out Harmonic mean.
Find out Harmonic mean.

3 years ago

Solved


Count number of words in string
Count number of words in string Examples 'hi', answer is 1 'hi hi', answer is 2 'I enjoy cody', answer is 3

3 years ago

Solved


Convert decimal to hex as shown in test cases
Convert decimal to hex as shown in test cases.

3 years ago

Solved


Number of Flip Flop required in ripple counter
Find the number of flip flop required in ripple counter. If modulus of counter (N) is given find outnumber of Flip Flop (n) r...

3 years ago

Solved


Find out of matrix transpose Complex conjugate
Find out of matrix transpose Complex conjugate A=[2 3+i;1 4+i] Then answer must be [2.0000 1.0000; ...

3 years ago

Solved


Crate a vector of logarithmically spaced
Create a vector of logarithmically spaced from 10^0 to 10^x with n sample Example: if x=4 and n=3 Answer must be=[1 100 10...

3 years ago

Solved


Find out next state (NS) of T Flip-Flop.
Find out next state (NS) of T Flip-Flop based on previous state (PS), inputs. Learn more about T Flip-Flop theory here: <htt...

3 years ago

Load more