Filter big data simulink or matlab
조회 수: 1 (최근 30일)
이전 댓글 표시
Hi I have the data in the image below :
![](https://www.mathworks.com/matlabcentral/answers/uploaded_files/171347/image.png)
and I tried smoothing and/or filtering, but had no luck to get a reasonable result. My goal is to get rid of all the spikes in the blue and make the plot similar to the red line much as possible. Any idea of the best method to that? The image below is for zoomed data
![](https://www.mathworks.com/matlabcentral/answers/uploaded_files/171348/image.png)
and the attached image is for the all plot:
![](https://www.mathworks.com/matlabcentral/answers/uploaded_files/171349/image.png)
댓글 수: 0
채택된 답변
Greg Dionne
2018년 6월 29일
편집: Greg Dionne
2018년 6월 29일
hampel should get you started
plot(hampel(OutAIS.Data))
If you need something fancier, take a look at the diff of your signal:
plot(diff(OutAIS.Data),'.')
Your outliers seem to take a set of quantized values. That might help you replace the values with something more meaningful than a median.
댓글 수: 0
추가 답변 (1개)
Image Analyst
2018년 3월 17일
Can you attach the data in a .mat file? Also explain how you're getting the red line. For example sometimes you take the tops of the blue spikes and other times, it's in the middle of the spikes. So, why is the red line from 9 - 14 in the 180-182 region, and not in the 4-8 range for y? And from 188-192, why is the red line in the middle and not going along the tops of the blue spikes like in the left hand side of the plot? What rule(s) are you using?
Have you tried boundary()? Or sgolayfilt()?
For the data on the right, have you tried filtering and then tossing out data far away from the filtered result, and then splining the data to fill in missing values? (spline demo attached)
참고 항목
카테고리
Help Center 및 File Exchange에서 Spectral Measurements에 대해 자세히 알아보기
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!