Origin fit plotted on mathematica

  • Context: Mathematica 
  • Thread starter Thread starter Telemachus
  • Start date Start date
  • Tags Tags
    Fit Mathematica Origin
Click For Summary

Discussion Overview

The discussion revolves around discrepancies observed when plotting a polynomial fit in Mathematica using coefficients obtained from OriginLab. Participants explore potential reasons for the differences in the plots generated by the two software programs.

Discussion Character

  • Technical explanation, Debate/contested

Main Points Raised

  • One participant reports a mismatch between the polynomial plot in Mathematica and the one in OriginLab, questioning whether the issue lies with the software or their data transfer process.
  • Another participant requests the exact (x,y) data pairs and polynomial coefficients to help reproduce the issue and provide a solution.
  • A participant shares the polynomial coefficients as extracted from OriginLab, along with the Mathematica code used for plotting.
  • One participant mentions that after fitting the data directly in Mathematica, the resulting plot aligns with the one from Origin, suggesting that the coefficients from Origin may be truncated.

Areas of Agreement / Disagreement

Participants have not reached a consensus on the cause of the discrepancies, with some suggesting potential issues with data transfer or coefficient truncation, while others seek more information to clarify the problem.

Contextual Notes

There may be limitations related to the precision of coefficients, data formatting, or differences in how each software handles polynomial fitting.

Telemachus
Messages
820
Reaction score
30
Hi there. I have a problem with this. I'm trying to plot a polynomial fit done with origin 8.5 on mathematica. The thing is that the polynomial plot I get in mathematica from the coefficients given in originlab don't match, and I don't know why. I'll let you some pics of what I'm trying to do, the first one is the fit on origin lab, the second the tabs with the coefficients, and the third the plot on mathematica. I also draw two circles in the part of the graph which makes clear the differences between one plot and the other.

What could be happening? is that the software isn't working or did I made any mistake when going from origin to mathematica?

I tried to replace the exponential basis from 10 to e, but that makes it look even worse.

Img. 1
attachment.php?attachmentid=40487&stc=1&d=1319988012.png


Img. 2
attachment.php?attachmentid=40488&stc=1&d=1319988012.png


Img. 3
attachment.php?attachmentid=40489&stc=1&d=1319988012.png


Bye there, and thank you in advance.
 

Attachments

  • orgraph.PNG
    orgraph.PNG
    3.6 KB · Views: 689
  • tab.PNG
    tab.PNG
    29.1 KB · Views: 684
  • math.PNG
    math.PNG
    16 KB · Views: 681
Physics news on Phys.org
This one is for the same range.
attachment.php?attachmentid=40493&stc=1&d=1319992930.png
 

Attachments

  • range.PNG
    range.PNG
    2.4 KB · Views: 621
Would you consider posting as plain ordinary ascii text the list of (x,y) pairs you gave Origin and the polynomial coefficients that Origin gave you back? Literally scrape the exact values off the screen or in some other way provide the numbers in text form.

With plain ordinary ascii text anyone trying to reproduce the problem and offer a solution isn't required to type the whole thing back in, and even then can't even be sure they are using the exact same data.
 
Hi Bill, thanks for posting. I'm sorry I couldn't answer you on yestarday. But here it is.

Value
B Intercept...19,6
B B1.....1,08687
B B2.....-0,3755
B B3.....0,05509
B B4.....-0,00375
B B5.....7,95435E-5
B B6.....4,08596E-6
B B7.....-2,86506E-7
B B8.....6,43352E-9
B B9.....-5,15102E-11

I just copied it from the table that you can see in Img. 2. And here I give you the code I tiped into mathematica when plotting the polynomial:

f[z_] := 19.6 + 1.08687*z - 0.3755 z^2 + 0.05509*z^3 - 0.00375*z^4 +
7.95435 10^(-5)*z^5 + (4.08596 10^(-6))*z^6 - 2.86506 10^(-7)*z^7 +
6.43352 10^(-9)*z^8 - 5.15102 10^(-11)*z^9
 
I made the fit entirely with mathematica, and now it looks like the one given by origin. Perhaps the values origin gives in the table are truncated.
 

Similar threads

  • · Replies 5 ·
Replies
5
Views
3K
  • · Replies 11 ·
Replies
11
Views
3K
  • · Replies 2 ·
Replies
2
Views
3K
  • · Replies 1 ·
Replies
1
Views
2K
  • · Replies 1 ·
Replies
1
Views
2K
  • · Replies 3 ·
Replies
3
Views
5K
  • · Replies 1 ·
Replies
1
Views
2K
  • · Replies 12 ·
Replies
12
Views
5K
  • · Replies 5 ·
Replies
5
Views
2K
  • · Replies 2 ·
Replies
2
Views
3K