Put a given sequence on time slots
3 次查看(过去 30 天)
显示 更早的评论
For example, I have 48-time slots (t) and I want to put a block of a sequence [1,1,0,0] on these time slots randomly from (t+n) to (t+n+4). How can i generate such a sequence.
0 个评论
采纳的回答
Walter Roberson
2018-10-12
n = randi(length(t) - 3)
t(n:n+3) = [1 1 0 0]
4 个评论
Hiba Haider
2023-1-20
hello dear
same idea i have 24 slot for example i want choose one slot from slot 11 to slot 22 how can i apply
更多回答(0 个)
另请参阅
类别
在 Help Center 和 File Exchange 中查找有关 Logical 的更多信息
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!