Community Tip - You can change your system assigned username to something more personal in your community settings. X
Hi,
is it possible to do a regression as simple as in a graphing calculator?
There I have got a statistic menu where i can write down my x and y values. Then I hit the [Reg]ression button and the [sin]us button. Done.
I tried to solve my problem in MathCad with 2 vectors and the sinfit function, but it does not work 😕
There is the same problem with an exponential function...
There I used expfit, where it said the "guessing"-vector is optional, so I left it out. -> No solution...
Can u help me??
Thank You.
Solved! Go to Solution.
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 built-in ones.
Can you post a worksheet of the problem?
Mike
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...
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 built-in ones.
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
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 built-in functions.
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
Superb function Richard.
I'm confused. Which function?
I'm confused. Which function?
The fitting function. I know you have only used Minerr, but the way it is implemented is impressive.
Mike
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 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