Turn on suggestions

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

Showing results for

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

Showing results for

** Community Tip** - You can change your system assigned username to something more personal in your community settings.
X

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

Feb 15, 2021
03:44 PM

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

Feb 15, 2021
03:44 PM

Generate a function from a scatterplot

so i have two vectors.

One is a time stamp

the second is y axis data.

so for each time stamp there is a corresponding data point

I need to plot this scatterplot somehow and then find a line of best fit.

Then i need to take the integral of it.

I have tried to use the regress function and the interp function without luck. All i get are errors.

I cant find a good example online.

The is just a simple 2d plot. Good old X and Y

Can someone help me with an example.

I dont understand all the parameters that regress and interp are expecting.

When i try to plot it just gives me an error. i cant post my sheet because of IP

2 REPLIES 2

Feb 16, 2021
09:23 AM

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

Feb 16, 2021
09:23 AM

In general: Unless you have a model of the phenomenon that describes the function you want to integrate, there's no better estimate of the total integral than just summing the datapoints you have.

[ You cannot add accuracy that is not present in your data.]

If you do have a model, it makes sense to fit the points to your model and potentially derive model parameters. That will give you a function, which you can integrate.

Please see the discussion here: https://community.ptc.com/t5/PTC-Mathcad/Direct-Integration-Problem-MathCAD/m-p/625854#M187108 .

Success!

Luc

Feb 16, 2021
10:04 AM

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

Feb 16, 2021
10:04 AM

I had a similar topic and it was solved very well here, have a look:

Basically a function which interpolates your datapoints was found with "curveexpert professional"

Afterwards the "genfit" function was used.

Regards