how to crreate an array
3 vues (au cours des 30 derniers jours)
Afficher commentaires plus anciens
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 commentaires
Réponse acceptée
Star Strider
le 5 Nov 2017
Modifié(e) : Star Strider
le 5 Nov 2017
Try this:
x=[1 0 1];
N = 10;
Output = reshape(repmat(x(:)', N, 1), 1, [])
2 commentaires
Plus de réponses (1)
Voir également
Catégories
En savoir plus sur Logical dans Help Center et File Exchange
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!