storing points using a threshold critera
3 ビュー (過去 30 日間)
i have data of time vs concentration. i want to first find the point that crosses a threshold (concentration) of 15, then find the next point which goes below the threshold. then i want to store all of the points between the first point and second point into a vector in the workspace p(1), p(2) p(3) ... i want to create a loop such that it repeats finding the first and last points from time =0 to time = end. attached is a picture the points in yellow are the data that exceeds the threshold
回答 (1 件)
Image Analyst 2014 年 8 月 20 日
編集済み: Image Analyst 2014 年 8 月 20 日
OK. Seems easy enough. What did you try? Did you try
indexesAboveThreshold = find(signal > 15);
signalElementsAboveThreshold = signal(indexesAboveThreshold);
??? Do you actually have a question?
If you don't care about what the indexes are you can do it in a single line:
signalElementsAboveThreshold = signal(signal > 15);
Did you try that? What happened when you did?