gettrigger.m does not work properly. This seems to be an typing error. In line 40 it should be
TRIG = find(sign(diff(s-TH))>0)+1;
instead of
TRIG = find(diff(sign(s-TH))>0)+1;
I do not see your point. The idea of gettrigger is to identify those times when the signal gets larger then the threshold TH. Your code identifies those times when the slope of the signal changes is sign, the value of TH does not matter. This is clearly a different idea.
I'm closing this Bug. If you want to discuss this further, I ask you to raise the issue at our the mailinglist.
If you think that your code might, I'd like to learn about your use case.
Alois
If you would like to refer to this comment somewhere else in this project, copy and paste the following link:
I do not see your point. The idea of gettrigger is to identify those times when the signal gets larger then the threshold TH. Your code identifies those times when the slope of the signal changes is sign, the value of TH does not matter. This is clearly a different idea.
I'm closing this Bug. If you want to discuss this further, I ask you to raise the issue at our the mailinglist.
If you think that your code might, I'd like to learn about your use case.
Alois