フィルターのクリア

Splitting the signal into different parts.

5 ビュー (過去 30 日間)
JA
JA 2016 年 6 月 8 日
編集済み: goerk 2016 年 6 月 9 日
I am trying to analyze and apply filter to a signal(measurements). But the problem is while recording the measurements, between 2 timestamps the value was not recorded, so the program used to record these measurements just connected these 2 loose ends, this is a problem for my algorithm. so i want to split the signal into multiple parts based on this abnormality. I need to do this automatically. Below is the image of the abnormality.
Below i have shown a pic of plot(diff(t)).
So my signal will now divided into 3 parts. Any idea how to do this will be appreciated.
  3 件のコメント
JA
JA 2016 年 6 月 8 日
I just zoomed in to show how it looks, there is actually 2 time gaps.
JA
JA 2016 年 6 月 8 日
the t index around 7500, is the one showing from t= 20, to t = 21.

サインインしてコメントする。

回答 (1 件)

goerk
goerk 2016 年 6 月 8 日
編集済み: goerk 2016 年 6 月 9 日
If you have a signal like this shown in Figure2 you can use this information.
changeDetected = [false, diff(t)>0.1]; %get the points with a time step
categoryID = cumsum(changeDetected); %get the category of the time-slot (starting from 0)
nofCategorys = categoryID(end)+1; % number of found time-slots
for ii = 1:nofCategorys
mask = categoryID == (ii-1); % get a mask for the current category
extractedSignal = signal(mask); % get the signal of the current time slot
erg(ii)=yourAlgorithm(extractedSignal); % make your calculations
end
where your input data are the vetors 'signal' and 't'.
  7 件のコメント
JA
JA 2016 年 6 月 9 日
Did you mean nofCategorys
goerk
goerk 2016 年 6 月 9 日
編集済み: goerk 2016 年 6 月 9 日
Yes, you can loop through all categorys (time-slots) and analyse the specific signal part. I fixed this typo in the statement above.

サインインしてコメントする。

カテゴリ

Help Center および File ExchangeCorrelation and Convolution についてさらに検索

Community Treasure Hunt

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

Start Hunting!

Translated by