Find a value when it meets two conditions
14 vues (au cours des 30 derniers jours)
I'm trying to find a specific value in an array when it meets two conditions (1- as soon as it occur the first time, 2- if its longer than 2 seconds), then, I want the code to stop and give me the length from the beginng to that value that mets both conditions. Here is my code:
for i = 1:length (M)
if W = find ((M >=5) & i > t)
W = length(i);
Thanks in advance for the help.