# Fit data to a sinusoidal curve

9 views (last 30 days)
Daria Ivanchenko on 18 Feb 2021
Answered: Star Strider on 18 Feb 2021
Hi! I have two plots with data, they both look like a part of sinusoid. I have to prove that the changes in these two plots start at the same time by fitting a sinusoid to them. And then I have to make sure that they have the same sinusoidal period.
I am attaching the picture. So the first and the third plots in blue color are the ones that have to be fitted to a sinusoid. You can see that both lines start to change at the same time - the meanings are getting smaller.
How can I do this?
Thank you!
##### 0 CommentsShow -2 older commentsHide -2 older comments

Sign in to comment.

### Answers (1)

Star Strider on 18 Feb 2021
One option is to see if the approach in Curve fitting to a sinusoidal function does what you want.
##### 0 CommentsShow -2 older commentsHide -2 older comments

Sign in to comment.

### Categories

Find more on Get Started with Curve Fitting Toolbox in Help Center and File Exchange

### Community Treasure Hunt

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

Start Hunting!