Info

此问题已关闭。 请重新打开它进行编辑或回答。

need loop to run the below code

1 次查看(过去 30 天)
Amit Pandey
Amit Pandey 2020-2-25
关闭: MATLAB Answer Bot 2021-8-20
i have below data -
time vector (sec), time = [1;2;3;4;5;6;.....;n]; (nx1)
enable vector, enbl =[0;0;0;1;1;1;1;1;1;1;0;0;0;0;0;1;1;......]; (nx1)
I want to create a enable2 vector with below condition -
If time between enbl (==1) is less than 10 sec, then i want enable2 to be 0 else enable2 = enbl.
thanks
  1 个评论
Andrei Bobrov
Andrei Bobrov 2020-2-25
编辑:Andrei Bobrov 2020-2-25
Please attach here your data (time and enbl) as mat-file.

回答(0 个)

此问题已关闭。

标签

Community Treasure Hunt

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

Start Hunting!

Translated by