how to crreate an array
1 Ansicht (letzte 30 Tage)
Ältere Kommentare anzeigen
Awesomer
am 5 Nov. 2017
Kommentiert: Awesomer
am 5 Nov. 2017
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 Kommentare
Akzeptierte Antwort
Star Strider
am 5 Nov. 2017
Bearbeitet: Star Strider
am 5 Nov. 2017
Try this:
x=[1 0 1];
N = 10;
Output = reshape(repmat(x(:)', N, 1), 1, [])
2 Kommentare
Weitere Antworten (1)
Siehe auch
Kategorien
Mehr zu Logical finden Sie in Help Center und File Exchange
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!