Find discontinuities and lift up or pull down the part after the discontinuity
9 ビュー (過去 30 日間)
古いコメントを表示
Hi everyone i have a singal with discontinuities.Does anyone know how can i find the discontinuities and at those points lift up or pull down the remaining signal?
3 件のコメント
採用された回答
Jan
2021 年 12 月 13 日
x = linspace(1, 10*pi, 200);
y = sin(x);
y(60:90) = y(60:90) + 1;
y(120:180) = y(120:180) - 1;
yOrig = y;
limit = 0.2;
dy = [0, diff(y)];
jump = strfind(abs(dy) > limit, [false, true, false]);
for ijump = 1:numel(jump)
k = jump(ijump);
y(k+1:end) = y(k+1:end) - dy(k+1);
end
figure
axes('NextPlot', 'add')
plot(x, yOrig, '-r', x, y, 'bo')
y2 = lowpass(y, 30, 200);
plot(x, y2, 'c+')
8 件のコメント
その他の回答 (1 件)
Image Analyst
2021 年 12 月 13 日
See a similar discussion started/asked by Matt J:
5 件のコメント
Image Analyst
2021 年 12 月 15 日
I guess those were just some parameters to cause a chunk of the waveform to shift by a reasonable amount.
参考
カテゴリ
Help Center および File Exchange で Computer Vision with Simulink についてさらに検索
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!