Al momento, stai seguendo questo contributo
- Vedrai gli aggiornamenti nel tuo feed del contenuto seguito
- Potresti ricevere delle email a seconda delle tue preferenze per le comunicazioni
NTRUE - Logical array with a specific number of true values
NTRUE(N,P,Q, ...) or NTRUE(N,[P Q ...]) creates a logical array of size
[P Q ...] with N randomly positioned true values. NTRUE(N,P) is short for
NTRUE(N,P,P). All arguments (N,P,Q,...) are positive scalars.
NTRUE(N) creates a N-ny-N matrix with N true values.
Example:
NTRUE(5,3,4) % creates a 3-by-4 matrix with 5 true (and 7 false)
values, for instance:
% 0 0 0 0
% 1 1 0 0
% 1 0 1 1
See also TRUE, FALSE, ONES, ZEROS,
and SLM, SHAKE, NONES (on the MatLab FEX)
Cita come
Jos (10584) (2026). NTRUE (https://it.mathworks.com/matlabcentral/fileexchange/10924-ntrue), MATLAB Central File Exchange. Recuperato .
Riconoscimenti
Ispirato: randone1
Informazioni generali
- Versione 1.0.0.0 (1,73 KB)
Compatibilità della release di MATLAB
- Compatibile con qualsiasi release
Compatibilità della piattaforma
- Windows
- macOS
- Linux
| Versione | Pubblicato | Note della release | Action |
|---|---|---|---|
| 1.0.0.0 | (sep 2006)
|
