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!
