필터 지우기
필터 지우기

Info

이 질문은 마감되었습니다. 편집하거나 답변을 올리려면 질문을 다시 여십시오.

How much a signal curves

조회 수: 1 (최근 30일)
KADEM Mohamed
KADEM Mohamed 2016년 3월 9일
마감: MATLAB Answer Bot 2021년 8월 20일
I asked a question earlier in : math.stackexchange, It was the follwing :
I have a random signal, and i need a way in simulink to find how much this signal curves (the result will be a signal also proportional to how much the first one will curves, it doesn't matter if it's going up or down, all i care about if how much it curves).
In the answer the guy said i should use a double derivative or an integrator ? i tried, but it doesn't seem to work.
  댓글 수: 3
John BG
John BG 2016년 3월 10일
do you mean you want the Simulink amplifier? or the Simulink block d/dt ?
John D'Errico
John D'Errico 2016년 3월 10일
Is the signal noisy? If so, then you probably want to use a Savitsky-Golay filter to estimate the local second derivative of your series. Take the absolute value of that second derivative. Where it is large, your function is curved.
In MATLAB, conv can do the work. I have no idea how to make it work in simulink.
If you need to know how to calculate the coefficients of the corresponding kernel, that part is easy enough.

답변 (1개)

John D'Errico
John D'Errico 2016년 3월 10일
편집: John D'Errico 2016년 3월 10일
In MATLAB, I would do this:
n = (-5:5)';
A = [n.^2,n,ones(size(n))];
P = pinv(A);
SGfilt = P(1,:)/2
SGfilt =
0.0087413 0.0034965 -0.00058275 -0.0034965 -0.0052448 -0.0058275 -0.0052448 -0.0034965 -0.00058275 0.0034965 0.0087413
d2 = conv(Y,SGfilt,'valid');
plot(d2)
Where the result is large, the function is curved.
Note that noise will tend to be amplified, so on noisy data, you need to use a longer convolution kernel. Thus, n must have a larger span when the noise will be large.

이 질문은 마감되었습니다.

Community Treasure Hunt

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

Start Hunting!

Translated by