Get Help

Turn on suggestions

Auto-suggest helps you quickly narrow down your search results by suggesting possible matches as you type.

Showing results for

- Community
- :
- PTC Mathcad
- :
- PTC Mathcad
- :
- Regression of a trigonometric function or of an ex...

Options

- Subscribe to RSS Feed
- Mark Topic as New
- Mark Topic as Read
- Float this Topic for Current User
- Bookmark
- Subscribe
- Printer Friendly Page

Auto-suggest helps you quickly narrow down your search results by suggesting possible matches as you type.

Showing results for

Highlighted

- Mark as New
- Bookmark
- Subscribe
- Subscribe to RSS Feed
- Permalink
- Email to a Friend
- Notify Moderator

03-16-2011
03:17 PM

03-16-2011
03:17 PM

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.

Labels:

1 ACCEPTED SOLUTION

Accepted Solutions

- Mark as New
- Bookmark
- Subscribe
- Subscribe to RSS Feed
- Permalink
- Email to a Friend
- Notify Moderator

03-16-2011
06:28 PM

03-16-2011
06:28 PM

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.

10 REPLIES 10

- Mark as New
- Bookmark
- Subscribe
- Subscribe to RSS Feed
- Permalink
- Email to a Friend
- Notify Moderator

03-16-2011
03:58 PM

03-16-2011
03:58 PM

Re: Regression of a trigonometric function or of an exponential function

Can you post a worksheet of the problem?

Mike

- Mark as New
- Bookmark
- Subscribe
- Subscribe to RSS Feed
- Permalink
- Email to a Friend
- Notify Moderator

03-16-2011
04:29 PM

03-16-2011
04:29 PM

Re: Regression of a trigonometric function or of an exponential function

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

- Mark as New
- Bookmark
- Subscribe
- Subscribe to RSS Feed
- Permalink
- Email to a Friend
- Notify Moderator

03-16-2011
06:28 PM

03-16-2011
06:28 PM

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.

- Mark as New
- Bookmark
- Subscribe
- Subscribe to RSS Feed
- Permalink
- Email to a Friend
- Notify Moderator

03-16-2011
07:13 PM

03-16-2011
07:13 PM

Re: Regression of a trigonometric function or of an exponential function

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

- Mark as New
- Bookmark
- Subscribe
- Subscribe to RSS Feed
- Permalink
- Email to a Friend
- Notify Moderator

03-16-2011
07:23 PM

03-16-2011
07:23 PM

Re: Regression of a trigonometric function or of an exponential function

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.

- Mark as New
- Bookmark
- Subscribe
- Subscribe to RSS Feed
- Permalink
- Email to a Friend
- Notify Moderator

03-17-2011
02:53 AM

03-17-2011
02:53 AM

Re: Regression of a trigonometric function or of an exponential function

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

- Mark as New
- Bookmark
- Subscribe
- Subscribe to RSS Feed
- Permalink
- Email to a Friend
- Notify Moderator

03-17-2011
08:55 AM

03-17-2011
08:55 AM

Re: Regression of a trigonometric function or of an exponential function

Superb function Richard.

I'm confused. Which function?

- Mark as New
- Bookmark
- Subscribe
- Subscribe to RSS Feed
- Permalink
- Email to a Friend
- Notify Moderator

03-17-2011
08:58 AM

03-17-2011
08:58 AM

Re: Regression of a trigonometric function or of an exponential 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

- Mark as New
- Bookmark
- Subscribe
- Subscribe to RSS Feed
- Permalink
- Email to a Friend
- Notify Moderator

03-17-2011
09:14 AM

03-17-2011
09:14 AM

Re: Regression of a trigonometric function or of an exponential function

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.

Top Tags