解決済み


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

解決済み


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

解決済み


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

約5年 前

解決済み


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

解決済み


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

解決済み


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

解決済み


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

解決済み


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

解決済み


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

解決済み


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

解決済み


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

解決済み


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

解決済み


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

解決済み


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

解決済み


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

解決済み


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

解決済み


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

解決済み


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

解決済み


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

解決済み


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

解決済み


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

解決済み


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

解決済み


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

解決済み


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

解決済み


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

約5年 前

解決済み


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

解決済み


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

解決済み


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

解決済み


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

約5年 前

解決済み


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

約5年 前

さらに読み込む