The Origin Forum
File Exchange
Try Origin for Free
The Origin Forum
Home | Profile | Register | Active Topics | Members | Search | FAQ | Send File to Tech support
 All Forums
 Origin Forum for Programming
 LabTalk Forum
 poly-function

Note: You must be registered in order to post a reply.
To register, click here. Registration is FREE!

Screensize:
UserName:
Password:
Anti-Spam Code:
Format Mode:
Format: BoldItalicizedUnderlineStrikethrough Align LeftCenteredAlign Right Horizontal Rule Insert HyperlinkUpload FileInsert Image Insert CodeInsert QuoteInsert List
   
Message:

* HTML is OFF
* Forum Code is ON
Smilies
Smile [:)] Big Smile [:D] Cool [8D] Blush [:I]
Tongue [:P] Evil [):] Wink [;)] Clown [:o)]
Black Eye [B)] Eight Ball [8] Frown [:(] Shy [8)]
Shocked [:0] Angry [:(!] Dead [xx(] Sleepy [|)]
Kisses [:X] Approve [^] Disapprove [V] Question [?]

 
Check here to subscribe to this topic.
   

T O P I C    R E V I E W
peroma Posted - 06/29/2004 : 12:32:51 PM
Hi all,

I have got a problem with the "poly"-function in Origin:
I performed a polynomial regression and wanted to plot the regression data with the following line:

data1_C = poly(data1_A, stat.pr.a, stat.pr.b1, stat.pr.b2, stat.pr.3);

The data in data1_C were obviously nonsense for the were miles away from the original dataset.

With the lines:

data1_C= stat.pr.a;
loop (i, 1, 3) {data1_C=data1_C+ stat.pr.b$(i)*data1_a^i};

The parameters of the fit were:
STAT.PR.A=74,29484
STAT.PR.B1=-17,74396
STAT.PR.B2=-6812,026
STAT.PR.B3=134863,5

and the range of data1 was 0.003 to 0.028.

What it the reason for this big difference?

I'm very curious

Peter
2   L A T E S T    R E P L I E S    (Newest First)
peroma Posted - 06/30/2004 : 03:32:24 AM
Hi Easwar,

it was the typo that screwed everything up. The parameters were identical to those created with polynomial fit from the menu. So the result from the loop was the correct one.

Thanks so much
Peter
easwar Posted - 06/29/2004 : 1:52:37 PM
Hi Peter,

Looks like what you are trying to do is generate a fit dataset for the poly fit, at the same x values as the raw data.

I see that your first script line has a typo: should be stat.pr.b3 and not stat.pr.3

You second script segment should do the same thing as the first script line, and either one should give you the correct result.

Are you saying that neither gives the correct result? Does the original fit line (created by the polynomial fit menu/tool )follow your data well? And the computed dataset is way off the data as well as the original fit line?

If yes, please paste dataset here - if not too large, or send to tech@originlab.com. If you send in the data, please mention this posting.

Easwar
OriginLab





The Origin Forum © 2020 Originlab Corporation Go To Top Of Page
Snitz Forums 2000