create a vector of repeated different values and different repetitions
5 Ansichten (letzte 30 Tage)
Ältere Kommentare anzeigen
Mohammad Aljarrah
am 11 Mär. 2021
Bearbeitet: Mohammad Aljarrah
am 11 Mär. 2021
hello,
i have data that looks like this
Value repetition
1 5
3 2
5 3
6 1
10 4
i want to create a vector that looks like this
1 1 1 1 1 3 3 5 5 5 6 10 10 10 10
so basically, repeats the numbers in Value colum n repititions.
can anyone please help? thanks
0 Kommentare
Akzeptierte Antwort
Steven Lord
am 11 Mär. 2021
Take a look at the repelem function.
1 Kommentar
Mohammad Aljarrah
am 11 Mär. 2021
Bearbeitet: Mohammad Aljarrah
am 11 Mär. 2021
Weitere Antworten (0)
Siehe auch
Kategorien
Mehr zu Introduction to Installation and Licensing 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!