Solved


Find the longest match inside two strings
Given two strings, find the longest string which is contained within both strings. e.g. the longest string that is contained ...

6 years ago

Solved


Calculate the Damerau-Levenshtein distance between two strings.
<http://www.mathworks.co.uk/matlabcentral/cody/problems/2303-compute-hamming-distances-between-each-pair-of-rows-from-two-input-...

6 years ago

Solved


Broken numlock key, oppps !
The numlock key on my computer is pressed and is now broken, so I cant press it to switch off the numlock mode. And hence I am n...

6 years ago

Solved


Flip the bit
Given an input character string (e.g. '1001'), return a character string with the bits flipped ('0110').

6 years ago

Solved


Reverse within string
If input is a string 'yellow' the output should be 'leywol'. Locate the middle of the string and reverse the first (yel) and sec...

6 years ago

Solved


Find an optimal placement of coolers on a grid
In a certain chemical plant, 6 new pieces of cooling equipment (coolers) are to be installed in a vacant space. This vacant spac...

6 years ago

Solved


Characterize fluid flow in a pipe as to laminar or turbulent
In fluid mechanics, characterizing the flow in a pipe is essential to predicting its behavior. The flow pattern can either be la...

6 years ago

Solved


Compute the missing quantity among P, V, T for an ideal gas
Consider 100 mol of helium gas at a certain pressure (P), volume (V), and temperature (T). Assuming that the ideal gas law appli...

6 years ago

Solved


Find an overlap in the cleaning schedule of two tank reactors
In a certain pharmaceutical production company, there are two tank reactors operating simultaneously and independent of each oth...

6 years ago

Solved


Assess the scatter of wind turbines in a field
The renewable energy industry is on the rise in many countries--- and one of the key players is wind energy. It is believed ...

6 years ago

Solved


Design a tubesheet for shell-and-tube heat exchangers
<<https://3.bp.blogspot.com/-kLSbhcCoT2I/WJIh-QVGLGI/AAAAAAAADEs/svvMzBqn4fUfI1rTCCH7Uw-QuDvxx0PxACLcB/s1600/Screenshot_669.jpg>...

6 years ago

Solved


Create a matrix map of increasing safety levels
The sole nuclear power plant at Grid City suddenly had a meltdown. Luckily, the plant was designed to be in full automation, so ...

6 years ago

Solved


Count the number of folds needed to pack a large sheet
In a certain paper factory, large sheets of paper are being made every day. Before sending the sheets for shipment, they have to...

6 years ago

Solved


Calculate the sphericity of a Raschig ring
Sphericity is a measure of the roundness of any particle. It was defined by Wadell in 1935 as the ratio of the 'surface area of ...

6 years ago

Solved


Convert a temperature reading from Celsius to an unknown scale
Two of the most famous temperature scales are the Celsius and the Fahrenheit scale. In reality, however, there are so many other...

6 years ago

Solved


Sort numbers by outside digits
Sort the array so that they are sorted as if their value was a 5 digit number made from the first three and last two digits of t...

6 years ago

Solved


Index of a Rational number
The set of real numbers are infinite. They are so many that real numbers can't even be enumerated. However, unlike real numbers ...

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

6 years ago

Solved


Index one element in each vector of an array along a given dimension
Functions like min and max can return in their second output argument the index of the element in each vector along a particular...

6 years ago

Solved


Find the maximum two numbers of every column of a matrix
Find the maximum two numbers of every column of a matrix. Example: If we input a matrix A = [ 1 2 4 6 0 3 ...

6 years ago

Solved


Finding neighbors of [-1:1] in a matrix....
Hello All! Well I found this one fun to figure out, all you have to do is make a matrix of 1's or 0's (true or false) that sh...

6 years ago

Solved


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

6 years ago

Solved


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

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

6 years ago

Solved


Sum of odd numbers in a matrix
Find the sum of all the odd numbers in a matrix. Example x = [2 3 5 7 1 4 11] y = 27

6 years ago

Solved


Find the index of n in magic(n)
If input n=5, then magic(n) is 17 24 1 8 15 23 5 7 14 16 4 6 13 20 22...

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

6 years ago

Solved


Largest territory
Determine whose territory is largest. If there are multiple numbers tied for the largest territory, return the smallest number. ...

6 years ago

Solved


counting groups!
This problem is about counting groups. Example If you have x: x = [0.8 0.8 0.8 0.3 0.3 0.4 0.5 0.6 0.6 0.9] then a...

6 years ago

Solved


Three...is a magic number.
Yes it is... It's a magic number... To help you get rid of that earworm, here's a new Cody problem. You are given a squar...

6 years ago

Load more