how to crreate an array
1 visualizzazione (ultimi 30 giorni)
Mostra commenti meno recenti
lets say i have an array x=[1 0 1] how can i sample every bit 10 times. output will be 1 1 1 1 1 1 1 1 1 1 0 0 0 0 0 0 0 0 0 0 1 1 1 1 1 1 1 1 1 1
0 Commenti
Risposta accettata
Star Strider
il 5 Nov 2017
Modificato: Star Strider
il 5 Nov 2017
Try this:
x=[1 0 1];
N = 10;
Output = reshape(repmat(x(:)', N, 1), 1, [])
2 Commenti
Più risposte (1)
Vedere anche
Categorie
Scopri di più su Logical in Help Center e File Exchange
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!