Skip to main content
1-Visitor
March 16, 2011
Solved

Regression of a trigonometric function or of an exponential function

  • March 16, 2011
  • 1 reply
  • 7028 views

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.

Best answer by RichardJ

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.

1 reply

1-Visitor
March 16, 2011

Can you post a worksheet of the problem?

Mike

FloFi231-VisitorAuthor
1-Visitor
March 16, 2011

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...

FloFi231-VisitorAuthor
1-Visitor
March 16, 2011

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