How to make threshold lines and mark the 1st intersection line?
Show older comments
Hi, I would like to ask a few questions:
- How to set 20% upper and lower threshold from the signal maximum amplitude and make a line of the thresholds.
- From the upper threshold line, how to find and mark the 1st line intersection between upper threshold and signal.
- How to expand the signal that only focus on the line intersection automatically.
I really appreciate if anyone can help me with matlab coding.
load energy_bigcircle_placement1 %load file
[p,s,mu]=polyfit((1:numel(bigcircle_ant2))',bigcircle_ant2,20);
f_y=polyval(p,(1:numel(bigcircle_ant2))',[],mu);
bigcircle_ant2_data=bigcircle_ant2 - f_y;
tms=(0:numel(bigcircle_ant2_data)-1)/Fs;
figure (1)
plot(tms,bigcircle_ant2_data)
axis tight
title('Signal and Scalogram')
xlabel('Time(s)')
ylabel('Amplitude')
grid on
Regards.
Accepted Answer
More Answers (0)
Categories
Find more on Data Distribution Plots 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!

