Digitization of noisy signal
5 views (last 30 days)
Show older comments
suman Dhamala
on 20 Feb 2018
Commented: Star Strider
on 21 Feb 2018
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
0 Comments
Accepted Answer
Star Strider
on 20 Feb 2018
If your have version R2016a or later of the Signal Processing Toolbox, use the findchangepts (link) function.
8 Comments
Star Strider
on 21 Feb 2018
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.
More Answers (0)
See Also
Categories
Find more on Filter Design in Help Center and File Exchange
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!