フィルターのクリア

How to determine the start time and the end time of the signal

10 ビュー (過去 30 日間)
Yew Jen Chong
Yew Jen Chong 2022 年 6 月 16 日
コメント済み: Yew Jen Chong 2022 年 6 月 16 日
Hi, I want to find the start time and the end time of the signal as shown in figure below.
I tried using "findchangepts" command to identify the both time but the x-axis is incorrect. Is someone know what is the reason?
In addition, I also not sure how accurate it is by using this method.
findchangepts(signal.CurrentRMS_amp_,'MaxNumChanges',3, 'Statistic','rms')
Is there any methods to find the time accurately?
Any advice would be appreciated.
Thank you.

採用された回答

Sam Chak
Sam Chak 2022 年 6 月 16 日
Alternatively, try this. The findchangepts function actually works.
T = readtable('https://www.mathworks.com/matlabcentral/answers/uploaded_files/1033920/signal.csv');
Warning: Column headers from the file were modified to make them valid MATLAB identifiers before creating variable names for the table. The original column headers are saved in the VariableDescriptions property.
Set 'VariableNamingRule' to 'preserve' to use the original column headers as table variable names.
t = T.(1);
y = T.(2);
ipt = findchangepts(y, 'MaxNumChanges', 10);
Tstart = t(ipt(1))
Tstart = 1.1100
Tfinal = t(ipt(end))
Tfinal = 1.6130
plot(t, y)
hold on
plot(Tstart, y(ipt(1)), 'ro', 'linewidth', 1.5, 'MarkerSize', 14)
plot(Tfinal, y(ipt(end)), 'ro', 'linewidth', 1.5, 'MarkerSize', 14)
xlim([1.05 1.65])

その他の回答 (1 件)

KSSV
KSSV 2022 年 6 月 16 日
T = readtable('https://in.mathworks.com/matlabcentral/answers/uploaded_files/1033920/signal.csv') ;
Warning: Column headers from the file were modified to make them valid MATLAB identifiers before creating variable names for the table. The original column headers are saved in the VariableDescriptions property.
Set 'VariableNamingRule' to 'preserve' to use the original column headers as table variable names.
t = T.(1) ;
x = T.(2) ;
idx = x>0.1 ;
plot(t,x,'r',t(idx),x(idx),'b')

カテゴリ

Help Center および File ExchangeParametric Spectral Estimation についてさらに検索

製品


リリース

R2021b

Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!

Translated by