解決済み


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年弱 前

解決済み


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年弱 前

解決済み


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年弱 前

解決済み


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

6年弱 前

解決済み


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年弱 前

解決済み


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年弱 前

解決済み


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年弱 前

解決済み


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年弱 前

解決済み


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年弱 前

解決済み


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年弱 前

解決済み


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年弱 前

解決済み


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年弱 前

解決済み


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年弱 前

解決済み


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年弱 前

解決済み


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年弱 前

解決済み


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年弱 前

解決済み


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年弱 前

解決済み


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年弱 前

解決済み


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年弱 前

解決済み


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年弱 前

解決済み


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年弱 前

解決済み


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年弱 前

解決済み


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

6年弱 前

解決済み


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年弱 前

解決済み


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年弱 前

解決済み


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年弱 前

解決済み


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年弱 前

解決済み


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

6年弱 前

解決済み


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年弱 前

解決済み


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年弱 前

さらに読み込む