# Fitting curve with an exponential function

조회 수: 5 (최근 30일)
aurc89 2016년 11월 18일
답변: Petorr 2016년 11월 18일
If I have a function y=f(x), where x and y are two vectors, which presents an exponential decay together with an oscillatory component, how can I remove the exponential "continuous" component in order to have only the oscillations with zero offset? Can you suggest me a code to do this? thanks

댓글을 달려면 로그인하십시오.

### 답변 (3개)

John D'Errico 2016년 11월 18일
You can't do this well, at least as you have posed the problem. Conversely, you CAN do this, but you will do a poor job of it. For example, you COULD use the curvefitting toolbox, with a pure simple exponential model. That would lump any noise together with the oscillatory component. Unless the oscillatory component is perfectly orthogonal to the exponential decay component, then the decay will be measured incorrectly.
What you need to do to do this well is to choose a model for the oscillatory component, as well as the exponential component. Then fit the complete model together. Again, the CFT can do this, but only after you have chosen an intelligent model for the complete process.
##### 댓글 수: 1이전 댓글 -1개 표시이전 댓글 -1개 숨기기
aurc89 2016년 11월 18일
thanks!

댓글을 달려면 로그인하십시오.

Star Strider 2016년 11월 18일
I would fit your exponentially decaying sine function (I’m guessing a sine function) with How to filter noise from time-frequency data and find natural frequency of a cantilever? That will give you the frequency of the sine function (frequency and phase). You can then plot the sine function alone using the estimated parameters for it.
##### 댓글 수: 0이전 댓글 -2개 표시이전 댓글 -2개 숨기기

댓글을 달려면 로그인하십시오.

Petorr 2016년 11월 18일
You might try the Hilbert Transform (see this). Then, divide your signal by the envelope. - Peter

댓글을 달려면 로그인하십시오.

### 카테고리

Help CenterFile Exchange에서 Curve Fitting Toolbox에 대해 자세히 알아보기

### Community Treasure Hunt

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

Start Hunting!

Translated by