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
NONES - fill each row/column with a certain number of ones (N-ONES)
A = NONES(V) creates a logical array A, in which each row/column
starts with zero or more TRUE entries followed by zero or more FALSE
entries, as specified by the elements of the vector V.
Examples
nones([1 0 4]) % ->
1 0 1
0 0 1
0 0 1
0 0 1
a = nones([-2 3 2 7].') ;
b = cumsum(a,2) ;
b(~a) = 0 % ->
0 0 0 0 0 0 0
1 2 3 0 0 0 0
1 2 0 0 0 0 0
1 2 3 4 5 6 7
Cita come
Jos (10584) (2026). nones (https://it.mathworks.com/matlabcentral/fileexchange/10622-nones), MATLAB Central File Exchange. Recuperato .
Riconoscimenti
Ispirato: padcatcell, Industrial Power Control By Cycle Switching
Informazioni generali
- Versione 1.2 (1,91 KB)
Compatibilità della release di MATLAB
- Compatibile con qualsiasi release
Compatibilità della piattaforma
- Windows
- macOS
- Linux
