create a vector of repeated different values and different repetitions

4 次查看(过去 30 天)
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

采纳的回答

Steven Lord
Steven Lord 2021-3-11
Take a look at the repelem function.

更多回答(0 个)

类别

Help CenterFile Exchange 中查找有关 Introduction to Installation and Licensing 的更多信息

产品


版本

R2020b

Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!

Translated by