Put a given sequence on time slots

4 ビュー (過去 30 日間)
Daud
Daud 2018 年 10 月 12 日
コメント済み: Walter Roberson 2023 年 1 月 20 日
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.

採用された回答

Walter Roberson
Walter Roberson 2018 年 10 月 12 日
n = randi(length(t) - 3)
t(n:n+3) = [1 1 0 0]
  4 件のコメント
Hiba Haider
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
Walter Roberson
Walter Roberson 2023 年 1 月 20 日

サインインしてコメントする。

その他の回答 (0 件)

Community Treasure Hunt

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

Start Hunting!

Translated by