Signal Fitting with sine curve (and how to find out the phase shift?)
古いコメントを表示
Hi!
I have a temperature signal (Y-axis) consisting of 764 values that looks like this -
And the time (X-axis) of this signal is a bit nonperiodic. Each of the observation points are like this -
I have timetable and the temperature data (attached). Can anyone please suggest me how can I fit this signal into a sine curve and get the amplitude, mean, and phase shift? Any feedback will be greatly appreciated!
5 件のコメント
Fitting a sine wave to a non-periodic function is an expensive random number generator.
Did you search in the forum already? You'd find e.g. https://www.mathworks.com/matlabcentral/answers/121579-curve-fitting-to-a-sinusoidal-function#answer_128539
Ashfaq Ahmed
2023 年 3 月 10 日
Ashfaq Ahmed
2023 年 3 月 10 日
編集済み: Ashfaq Ahmed
2023 年 3 月 10 日
Jan
2023 年 3 月 10 日
"Expensive random number generator" means, that the output has not more mathematical significance than rand(1, 4).
The function, Star Strider is fitting is:
fit = @(b,x) b(1).*(sin(2*pi*x.*b(2) + 2*pi*b(3))) + b(4)
Then 2*pi*b(3) is the phaseshift.
John D'Errico
2023 年 3 月 10 日
That signal does not have an even remotely fixed frequency. So there is no constant phase shift that could be estimated. Trying to do so would be meaningless.
採用された回答
その他の回答 (0 件)
カテゴリ
ヘルプ センター および File Exchange で Spectral Measurements についてさらに検索
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!



