NTRUE

Logical array with a specific number of true values

Download
Download

You are now following this Submission

Cite As

Jos (10584) (2026). NTRUE (https://in.mathworks.com/matlabcentral/fileexchange/10924-ntrue), MATLAB Central File Exchange. Retrieved .

Acknowledgements

Inspired: randone1

General Information

MATLAB Release Compatibility

  • Compatible with any release

Platform Compatibility

  • Windows
  • macOS
  • Linux
Version Published Release Notes Action
1.0.0

(sep 2006)
- algorithm after all checks
- replaced call to randperm by a direct call to sort

Download