Algorithm required to detect different phases of a real time data/signal.
2 Ansichten (letzte 30 Tage)
Ältere Kommentare anzeigen
Qazi Arbab Ahmed
am 17 Aug. 2017
Kommentiert: Qazi Arbab Ahmed
am 22 Aug. 2017
Hi, In the attached file we have ploted (red color), the performance of an processor vs number of ticks. The plot shows different behavior or phases during different ticks/execution. We want to mark these different phases as shown in the last figure (clipboard02) with black lines. All we need to do, is to write a CODE that we can automatically mark the change in the behavior as a phase, as shown in Figure (Clipboard) manually. Help from relevant experts would be appreciated. Thanks
0 Kommentare
Akzeptierte Antwort
Elizabeth Reese
am 21 Aug. 2017
First, you will need to establish some criteria for what a "phase change" should be. After doing this, you can use logical indexing to determine where the phase changes occur and then plot the thick black lines.
One way to determine a phase change is based on the "diff" function which calculates the difference between adjacent values in a vector. I have attached an example demonstrating this technique. Using the pure differences will be sensitive to noise in the data.
Another way to determine a phase change is based on deviation from the moving mean. For example, if you calculate the moving mean using the "movmean" function, you can compare the mean of the previous 10 ticks against the next tick. When the discrepancy between these values reaches a certain threshold, you have hit a new phase.
Once you have formalized what conditions indicate a phase change, you can follow the for-loop in the example and plot the horizontal and vertical lines.
Weitere Antworten (0)
Siehe auch
Kategorien
Mehr zu Graphics Objects finden Sie in Help Center und File Exchange
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!