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
Username:
Password:
Save Password
Forgot your Password? | Admin Options

 All Forums
 Origin Forum
 Origin Forum
 sine curvefitting
 New Topic  Reply to Topic
 Printer Friendly
Author Previous Topic Topic Next Topic Lock Topic Edit Topic Delete Topic New Topic Reply to Topic

aarnts

Netherlands
3 Posts

Posted - 11/18/1999 :  7:50:00 PM  Show Profile  Edit Topic  Reply with Quote  View user's IP address  Delete Topic
When I use the default settings of the sine function integrated in the nlsf object, I get often very poor results (it never finds the minimum). this also happens with very "pure" sinewaves. Even when I put the constrains and starting values very close to the expected values often very poor results are obtained.
When I use an other curve fitting programm, it finds a excelent fit without pre-setting of any value or constraint.
Are there some tricks (scripts) to obtaine also with origin quick and good results.

rtoomey

USA
184 Posts

Posted - 11/22/1999 :  7:26:00 PM  Show Profile  Edit Reply  Reply with Quote  View user's IP address  Delete Reply

We have not had any reports of problems with the built-in sine function in the nonlinear curve fitter. Therefore, in an effort to test this I generated two sets of typical experimental sine wave data. The first set of data was generated using radian angle measurements (X=0 to X=2p). The second set of data was generated using degree angle measurements (X=0 to X=360). I then fit the data generated in radians. Here's a quick description of how I did it:

  1. I selected the Y column which contains the sine wave data generated in radians.
  2. I then selected Analysis:Nonlinear Curve Fit. This opened the fitter, created a sine curve from X=0 to X=2p and automatically assigned the Y and X datasets to be fitted.
  3. I selected the Waveform Category and then the Sine Function (Function:Select if in the advanced mode).
  4. I then initialized (Action:Fit in the advanced mode) the three parameters to the following values:

    xc = 0
    w = 3.14
    A= 1

  5. I clicked the 10 Iter. button a few times to perform the fit.
  6. Finally, once I was satisfied with the fit I clicked the Done button to end the fitting session and exit out of the nonlinear curve fitter.

I then performed the same steps for the sine wave data generated in degrees. The initial parameters were quite similar. All I did was replace 3.14 (p) with 180 ():


xc = 0
w = 180
A = 1


In both cases I was able to obtain very satisfying results. Since this is the case, I cannot say for sure why you aren't obtaining good results. Rather than suggest ways to improve your fit through scripts, perhaps you could describe the steps you are taking to perform the fit? I could then look them over and try to provide you with suggestions on how to improve your procedure. Or you might try performing the fit as I have above to see if there was a step you had missed.

Just out of curiosity, what is the name of the other curve fitting program?

Sincerely,
Ryan Toomey

[This message has been edited by rtoomey (edited 11-22-1999).]

Go to Top of Page

Schmidtke

1 Posts

Posted - 06/21/2017 :  09:30:47 AM  Show Profile  Edit Reply  Reply with Quote  View user's IP address  Delete Reply
I completely agree with the complaint.
See the screenshots. I'm at a loss to explain why the fit was regarded as "susscessfull".
The
Go to Top of Page
  Previous Topic Topic Next Topic Lock Topic Edit Topic Delete Topic New Topic Reply to Topic
 New Topic  Reply to Topic
 Printer Friendly
Jump To:
The Origin Forum © 2020 Originlab Corporation Go To Top Of Page
Snitz Forums 2000