Digitization of noisy signal
6 次查看(过去 30 天)
显示 更早的评论
I have a signal as shown in the image here. I am trying to digitize the signal so that it catches the right jump only. My system is jumping between two states with noise. I want to calculate how much time it stays up and how much down. Could you please bring a super cool idea? Thanks for your help
![](https://www.mathworks.com/matlabcentral/answers/uploaded_files/170652/image.png)
0 个评论
采纳的回答
Star Strider
2018-2-20
If your have version R2016a or later of the Signal Processing Toolbox, use the findchangepts (link) function.
8 个评论
Star Strider
2018-2-21
Try this:
t = 1:numel(phi);
ipt = findchangepts(phi, 'MinThreshold',1000, 'Statistic','std');
figure(1110)
plot(t, phi)
hold on
plot([t(ipt(1:2:end)); t(ipt(1:2:end))], [zeros(1,numel(ipt(1:2:end))); 5*ones(1,numel(ipt(2:2:end)))], '-r', 'LineWidth',1.5)
hold off
It plots vertical lines at the transitions.
更多回答(0 个)
另请参阅
类别
在 Help Center 和 File Exchange 中查找有关 Measurements and Statistics 的更多信息
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!