Solved


Joining Ranges
You are given a n-by-2 matrix. Each row represents a numeric range, e.g. x = [0 5; 10 3; 20 15; 16 19; 25 25] contains...

5 years ago

Solved


Construct an index vector from two input vectors in vectorized fashion
Create an index vector defined by two input vectors, one defining the beginnings of one or more index ranges, and the other defi...

5 years ago

Solved


Multiply 2 numbers
Very easy, you just have to multiply 2 numbers but you cannot use the following signs (*, /, - ,^) ,mtimes , times, cross, pro...

5 years ago

Solved


Find similar/related functions
The _help_ function can be useful for getting quick assistance on a particular function. For most built-in MATLAB functions, a p...

5 years ago

Solved


Fill a zeros matrix
The aim is to fill an array of all zeros given a numerical value and the index of row and columns for this value. 3 Inputs: ...

5 years ago

Solved


Find mistyped words in text (mixed-up letters)
Mistyped words are a regular occurrence in emails, texts, status updates, and the like. Many times, people send or post a second...

5 years ago

Solved


Calculate the Hamming distance between two strings
Inspired by a similar Cody problem found <http://www.mathworks.com/matlabcentral/cody/problems/93-calculate-the-levenshtein-dist...

5 years ago

Solved


Permute diagonal and antidiagonal
Permute diagonal and antidiagonal For example [1 2 3;4 5 6;7 8 9] -> [3 2 1;4 5 6;9 8 7] WITHOUT diag function (and variable n...

5 years ago

Solved


Return a list sorted by number of consecutive occurrences
Inspired by Problem 38 by Cody Team. Given a vector x, return a vector y of the values in x sorted by the number of CONSECUTIVE...

5 years ago

Solved


Create logical matrix with a specific row and column sums
Given two numbers *|n|* and *|s|*, build an |n-by-n| logical matrix (of only zeros and ones), such that both the row sums and th...

5 years ago

Solved


Generate N equally spaced intervals between -L and L
Given N and L, return a list of numbers (in ascending order) that divides the interval [-L L] into N equal-length segments. F...

5 years ago

Solved


Eliminate Polysyllabics: Long live short words!
Given a string s1, return s2 in which all the words with more than one syllable have been removed. To make things simple, we ...

5 years ago

Solved


REPMAT Enhancement - Faster for Large Row Replication of Vector
The Challenge is to modify repmat.m to maintain all of its normal functionality and enhance its performance for large row replic...

5 years ago

Solved


intersection of matrices
Given two matrices filled with ones and zeros, determine if they share a common row, column entry. These matrices are of identi...

5 years ago

Solved


Unique - Very Very Large Numbers
Given a vector column, with some very large numbers, create the ascending sort and unique vector. *Input:* A (column vector)...

5 years ago

Solved


Unique: Speed Enhancement for uint(8,16,32)
This Speed Performance Challenge is to optimize Unique for processing uint8/uint16/uint32 variables. *Input:* A (column vecto...

5 years ago

Solved


New Cody Time-Out Time
Determine the New Cody Time-Out Time Consume the Maximum Possible Time without Timing out. *Score:* 60 (sec) - Time (sec) ...

5 years ago

Solved


Find: Faster Alternatives for Large Sorted/Unique Vectors
The Challenge is to create faster Find methods for large unique ascending vectors. Methods exist that are 1000 times faster t...

5 years ago

Solved


R2012b atan in Degrees
Return in degrees the atan result of inputs for all four quadrants. *Examples:* [x, y] Degrees 1 0 0 1 1 ...

5 years ago

Solved


Unique: Faster for options 'rows' and 'stable' for large array of uint8
Challenge: Execute unique(a,'rows','stable') Faster for 'a' being uint8. The "unique" function for the 'rows' and 'stable' o...

5 years ago

Solved


ismember: Enhanced Time Performance for 'rows' - Speed Scoring (90% savings)
The Challenge is to perform very fast the 'ismember' function for a long and wide array. The data is small integer representi...

5 years ago

Solved


Unique: Enhanced Performance - Large and Wide Array - Speed Improvement (66% savings)
The Challenge is to perform very fast unique function for a long and wide array. The data is small integer representing data ...

5 years ago

Solved


ismember: Enhanced Performance for 'rows' and width - Speed Scoring (66% savings)
The Challenge is to perform very fast the 'ismember' function for a long and wide array. The width of the array is expanded fro...

5 years ago

Solved


Cell Source Index
Suppose that C is a cell array whose elements consist of row vectors of elements of the same type. For example, C could be a ce...

5 years ago

Solved


McCabe Complexity
The Challenge is to return the McCabe complexity for various functions. One way to determine the McCabe Complexity is to use ...

5 years ago

Solved


Piecewise linear interpolation
Given an Mx2 vector and a row of M-1 integers, output a two column vector that linearly interpolates Y times between each succes...

5 years ago

Solved


Set a diagonal
Given a matrix M, row vector v of appropriate length, and diagonal index d (where 0 indicates the main diagonal and off-diagonal...

5 years ago

Solved


Gauss Eliminate 2-by-2 example
Use forward elimination to make the coefficient matrix, A, an upper triangular matrix, and then solve using back substitution, f...

5 years ago

Solved


Forward Substitution
Solve a lower triangular linear set of equations as described in the following link: http://www.people.virginia.edu/~teh1m/cody/...

5 years ago

Solved


Backward Substitution
Solve a upper triangular linear set of equations as described in the following link: http://www.people.virginia.edu/~teh1m/cody/...

5 years ago

Load more