フィルターのクリア

calculate delay for my vector ?

4 ビュー (過去 30 日間)
Bojan
Bojan 2014 年 6 月 6 日
編集済み: Azzi Abdelmalek 2014 年 6 月 6 日
I have vector for example. Ones and zeros are representing traffic and idle states for base station traffic.
u=[1 1 1 1 1 0 0 0 0 0 0 0 1 1 1 1 1 0 0 0 0 0 0 0 1 1 1 1 1 0 0 0 0 0 0 1 1 1 1 1 0 0 0 0 0 ]
I know how to calculate number of ones and zeros in it after each break. But I need help for delay. Zeros are telling me when I can put my base station in sleep mode. Is there a way to make a delay for example that, base station does not go to sleep after first zero, instead of that that it goes to sleep after third zero, that means with some kind o delay.

回答 (1 件)

Azzi Abdelmalek
Azzi Abdelmalek 2014 年 6 月 6 日
編集済み: Azzi Abdelmalek 2014 年 6 月 6 日
u=[1 1 1 1 1 0 0 0 0 0 0 0 1 1 1 1 1 0 0 0 0 0 0 0 1 1 1 1 1 0 0 0 0 0 0 1 1 1 1 1 0 0 0 0 0 ]
delay=3
idx=strfind(u,[1 zeros(1,delay)])+delay

カテゴリ

Help Center および File ExchangeDynamic System Models についてさらに検索

Community Treasure Hunt

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

Start Hunting!

Translated by