# how do i add a sine trend line on calc?

I use 6.0.3 on a win10 pc and i wanna add a sine/cosine trend line. But i cant find it anywhere, if there is such thing. Plesase help me!

First time here? Check out the FAQ!

how do i add a sine trend line on calc?

2

Functions desrcibable (approximately) with the help of harmonic functions mostly contain contributions by more than one harmonic function. This is similar as with polynomial approximations, but more convoluted.

Every single harmonic contributor is described by three parameters: Frequency, Amplitude, and Phase.

If you are confident your specific function is extrremely simple, it should allow for an approximation with one single harmonic.

In this simple case you can use the 'Solver' coming packed with LibreOffice, to find values for the three mentioned parameters meeting the needs.

(You might also test triples of FAP estimated by yourself and checked with the help of the chart. **L**east**S**quare isn't a dogm, but a pragmatic concept, imo.)

See this example: ask236405harmonicApproximationInMostSimpleCase_1.ods).

===Edit 2020-11-20 about 17:25 UTC===

(Attached example now contains the correction mentioned in my comment of 2020-07-13 below.)

If you want to do a lot of this sort of analysis, and besides the excellent suggestion by @Lupp above, you might consider using a mathematical analysis package like R Project (free and open source) or Matlab (proprietary, although there is a "free" trial version available).

What you need to use in either of those packages is a "discrete" (for empirical data) Fast Fourier Transform (FFT or DFFT) to solve for the spectrum of the data that you have. These solutions, however, will give you much more information than you might need or want, that is, all the spectral components (fundamental and harmonics and sub-harmonics) of the "signal" contained in your data, their frequencies, amplitudes and phases. So, the R and Matlab packages might not be appropriate for your problem. I mention these possible solutions so that you are at least aware of them.

Due to a different question I just came back to this topic rather accidentally.

On this occasion I had another look into the attached example, and found that the image of the solver dialog on the second sheet contaied a relevant error. I cannot remember the proable cause, but I can tell you that the field `Target cell`

should contain the cell where the SUM of quadratic deviations is calculated. In the example this is cell **$J$1** while the image wrongly shows *$E$5*. Sorry!

And congratualations to the clever users who found and fixed the error themselves.

0

Asked: ** 2020-04-01 18:07:58 +0100 **

Seen: **223 times**

Last updated: **Nov 20 '20**

How do I export a chart in an image format from LibreOffice Calc? [closed]

Are there plans for a "papercut" project for libreoffice [closed]

Is it normal for Calc goal seek to take very long? [closed]

Please refine "Search" in Calc - implement functions in Gnumeric [closed]

LibreOffice Calc will not link to external data via internet [closed]

Is there a LibreOffice .odt, .ods viewer for Android? [closed]

Why is Calc so much slower at opening/saving files than MS-Office? (win7 x64) [closed]

Content on this site is licensed under a Creative Commons Attribution Share Alike 3.0 license.

What is a sine/cosine trendline? Do you mean a sinus/cosine function fitting some existing data using a least squares fit?

yes exactly, english not my 1st language sorry. The thing is i miss some data thats why i want this to be a harmonic sine wave

Your real data (empiric?) won't worry about your wishes.

To analyze data based on the idea they might allow for an approximative description by harmonic functions is a common proceeding. However, it's very different from the approximations by trendlines based on internal usage of the LINEST() (and probably LOGEST()) functions with Charts.

I'm not well informed about the field. You may look for some terms containing the name 'Fourier' who was a French scientist and mathematician (around 1800) to whom the related mathematics is traced back.

See also my (very incomplete) answer.