Really like your generic approach to solving this problem. In my case, I was misled by the test suite to provide a solution that works only for integral values.
Find all elements less than 0 or greater than 10 and replace them with NaN
Reverse Run-Length Encoder
Indexed Probability Table
Is my wife right? Now with even more wrong husband
Nonuniform quantizer as a piecewise constant function
Size of this cup?
Minimum possible M of the maximum side of a triangle of given area A.
Selecting books on MATLAB for experts and beginners (blindfolded)
Create One Large Eye of size N x N Quickly?
Choose a web site to get translated content where available and see local events and offers. Based on your location, we recommend that you select: .
You can also select a web site from the following list:
Select the China site (in Chinese or English) for best site performance. Other MathWorks country sites are not optimized for visits from your location.
Contact your local office