
Re: Regression of a trigonometric function or of an exponential function
MikeArmstrong Mar 16, 2011 12:58 PM (in response to FloFi23)Can you post a worksheet of the problem?
Mike

Re: Regression of a trigonometric function or of an exponential function
FloFi23 Mar 16, 2011 1:29 PM (in response to MikeArmstrong)It's a task from my schoolbook.
t is the time in hours
dm is the current flow rate of a tidal power station in (m^3)/h
In the second graph you can see, that the regression results of my graphing calculator ar better than the results of mathcad...

Re: Regression of a trigonometric function or of an exponential function
A.Non Mar 16, 2011 3:28 PM (in response to FloFi23)Mathcad's sinfit function is essentially useless. There is no multiplier for x, and that multiplier changes the frequency of the sin wave. Whoever originally implemented this function, with no ability to vary the frequency, must have been mentally deficient!
Here's a generic approach to fitting. You can use this to fit any function, not just the few builtin ones.

Re: Regression of a trigonometric function or of an exponential function
FloFi23 Mar 16, 2011 4:13 PM (in response to A.Non)It's not that easy but thanks a lot!
Now I just have to read the manual or the help file to understand what you did

Re: Regression of a trigonometric function or of an exponential function
A.Non Mar 16, 2011 4:23 PM (in response to FloFi23)It's not that easy
True, but it is very flexible. You can use this approach to fit any function to your data, not just a few builtin functions.


Re: Regression of a trigonometric function or of an exponential function
MikeArmstrong Mar 16, 2011 11:53 PM (in response to A.Non)Superb function Richard.
I spent a lot of time trying to solve this last night with no success and never came across that function. Did you create it?
Mike

Re: Regression of a trigonometric function or of an exponential function
A.Non Mar 17, 2011 5:55 AM (in response to MikeArmstrong)Superb function Richard.
I'm confused. Which function?

Re: Regression of a trigonometric function or of an exponential function
MikeArmstrong Mar 17, 2011 5:58 AM (in response to A.Non)I'm confused. Which function?
The fitting function. I know you have only used Minerr, but the way it is implemented is impressive.
Mike

Re: Regression of a trigonometric function or of an exponential function
A.Non Mar 17, 2011 6:14 AM (in response to MikeArmstrong)It's standard stuff. There are hundreds (literally!) of examples of how to use minerr this way that have been posted over the years. It is not something I dreamt up on my own.

Re: Regression of a trigonometric function or of an exponential function
MikeArmstrong Mar 17, 2011 6:23 AM (in response to A.Non)It's standard stuff. There are hundreds (literally!) of examples of how to use minerr this way that have been posted over the years. It is not something I dreamt up on my own.
It's standard now because I have seen it, but it's not standard until someone posts an example. On this occasion the person was you, thus my gratitude heading your way.
Mike






