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
- :
- Quadratic fitting of data

Options

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

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

Showing results for

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

07-09-2018
04:46 AM

07-09-2018
04:46 AM

Quadratic fitting of data

Hello everyone

Attached to this post is a zip file with prime 3 sheet and an excel with the data. I need to fit this data using the following equation:

y = ax^2+bx+c

The solution I tried is not able to find an awnser.

Can anyone help me find a good fit to the data?

Labels:

8 REPLIES 8

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

07-09-2018
07:14 AM

07-09-2018
07:14 AM

Re: Quadratic fitting of data

@GvanBoven wrote:

Hello everyone

Attached to this post is a zip file with prime 3 sheet and an excel with the data. I need to fit this data using the following equation:

y = ax^2+bx+c

So why are you using pwrfit?? pwrfit (lookup the help!= tries to fit y=a*x^b+c and that has nothig to do with the quadratic fit you are looking for.

There are several way that this can be done in Prime

1) Use "polyfit". If you need to see the coefficients a,b,c, then use polyfitc

2) Use "linfit" with a vector consisting of 1,x and x^2 as function argument

3) Use "genfit". You can fit your data to any function you define with any number of parameters.

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

07-09-2018
07:20 AM

07-09-2018
07:20 AM

Re: Quadratic fitting of data

Hello Werner,

ah your right. I misread the formula of the pwrfit. I want to calculate a b and c so I guess I need to use the polyfit function. Thanks for the quick replay.

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

07-09-2018
07:21 AM

07-09-2018
07:21 AM

Re: Quadratic fitting of data

The function you want is not pwrfit, you want polyfit.

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

07-09-2018
08:04 AM

07-09-2018
08:04 AM

Re: Quadratic fitting of data

Thank you Fred,

I am uncertain how I can caculate the a b and c when I am using a polyfit function. Could you provide me with some more help?

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

07-09-2018
08:33 AM

07-09-2018
08:33 AM

Re: Quadratic fitting of data

@GvanBoven wrote:

Thank you Fred,

I am uncertain how I can caculate the a b and c when I am using a polyfit function. Could you provide me with some more help?

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

07-09-2018
10:58 AM

07-09-2018
10:58 AM

Re: Quadratic fitting of data

Here are the three methods I mentioned before in comparison:

Worksheet attached is in P4 format, so your Prime 3 will not be able to read it (and P4 is not able to save in P3 format - what a shame!)

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

07-09-2018
11:17 AM

07-09-2018
11:17 AM

Re: Quadratic fitting of data

OK, just for fun and for "completeness" sake here are two more methods 😉

In 5) I forgot about the good habit I mentioned in 4)

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

07-10-2018
05:15 AM

07-10-2018
05:15 AM

Re: Quadratic fitting of data

Thanks a lot Werner! I learned a lot from your last 2 posts