how to run an index loop while using find function
显示 更早的评论
I have two sets of (time) array. By using the time of red mark(ECG) as indicated in the picture. I'm trying to sweep to the right by fixed range (peakgap) to find the blue mark by using find function with condition RpeakTime<PPG1peakTime<PPG1peakTime+peakgap.
I'm trying to figure it out to use find function with index loop. How can I get the answer data of every red plot in array using for loop.
this is my code but I know it does not work
PPG1Psize = numel(PPG1peakTime);
peakgap = ((PPG1Psize)/(3*tend)); %estimate delay time between each ECG peak
for j=1:numECG
[rows,columns] = find(PPG1peakTime>RpeakTime(i) & PPG1peakTime<(RpeakTime(i)+peakgap));
end

6 个评论
Star Strider
2019-11-10
Use the findpeaks (or islocalmax) function to get the peaks and locations of each vector separately (EKG & PPG). Then you can get the relevant time differences from those results.
This would be much easier with your data (individual time vectors and corresponding EKG and PPG values).
Tipnirin Vajanarat
2019-11-10
编辑:Tipnirin Vajanarat
2019-11-10
Star Strider
2019-11-10
My pleasure.
There are several ways to correct a wandering baseline (the easiest in my opinion is to use a highpass filter, or bandpass filter to also remove high-frequency noise).
I cannot help you unless I have a representative sample of your data.
Tipnirin Vajanarat
2019-11-10
Image Analyst
2019-11-10
Did you see the last sentence of Star's comment?
Tipnirin Vajanarat
2019-11-11
编辑:Tipnirin Vajanarat
2019-11-11
采纳的回答
更多回答(0 个)
类别
在 帮助中心 和 File Exchange 中查找有关 Descriptive Statistics 的更多信息
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!
