Your definition of a constant (or invariant) data with rand is problematic. If you increase the size of your data (n=1000, n=10000...), you can always increase the deviations (so what threshold for sigma ?). I think that with real data, this artifact isn't possible. No ?
Nice solution that looks pretty nifty but it actually produces an unsafe result, just like Matlab's own zscore. It passed on it's first run trough the test suite but fails on some number of repeats. I've now added a second pass with a know random seed.
59 Solvers
All Humans are Created Equal - Pareto Equality
15 Solvers
Calculate Euler's phi function
71 Solvers
3144 Solvers
Area of an equilateral triangle
2904 Solvers
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!