i want to find distance between 2 peaks of a continuous signal. the signal is like a ECG signal but no -ve values. In my signal i have only positive peaks and i want to find frequency b/w peaks. The frequency b/w peaks are not const. So i want to find 2 successive peaks and distance b/w them.. I have tried using FFT but but i want to know abt amplitude data.. Could anyone plz help me in developing algorithm...
11 Aug 2014
Quickly finds local maxima (peaks) or minima (valleys) in a noisy signal.
@Frank I believe the function works as intended with the current indexing methodology. By using the same index (ii) for traversing both the valleys and the peaks, the function has to come down at least sel between each peak and two peaks can't be right next to each other. That said, please email me if you have an example of where you feel it does not work and I'd be happy to take a look.
Well, I couldn't find that specific website but here is another one. Please let me know if you found any cite-able references for this purpose.
As I had this problem and took me a while to figure it out, I thought it may be useful to someone else.
For anova_rm to be compatible with multcompare function of MATLAB, we need a stat output. I read somewhere (I printed out the webpage about a year ago but I can't find it anymore) that the post-hoc for repeated measures anova is the same as independent measures anova. You just need to replace MS(within) with MS(error) and df(within) with df(error) and then use Tuckey's equation to find the critical value. Thus, as I work with anova_rm as a one-way measure, I added the following lines at the end of anova_rm and added "stat" variable to the output of the function. I can now feed this stat to multcompare and the function sees stat as the output of anova1 and estimates the critical value using Tuckey (if that is your selected ctype) in the same way it does for anova1. As I don't use it for two-way measures, I haven't checked how to define stat for that purpose but I am sure it shouldn't be hard now.