Community Tip - You can Bookmark boards, posts or articles that you'd like to access again easily! X
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
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
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