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
 about the curve fitting (part of the circle)
 New Topic  Reply to Topic
 Printer Friendly
Author Previous Topic Topic Next Topic Lock Topic Edit Topic Delete Topic New Topic Reply to Topic

taufiki1029

Taiwan
2 Posts

Posted - 05/25/2012 :  02:56:57 AM  Show Profile  Edit Topic  Reply with Quote  View user's IP address  Delete Topic

Hello,

I have met some problem as I try to fit the following curve.



this curve actually is part of a circle.

so I use the advanced fiting tool to create a circle function like this,

y = b + sqrt(r^2-(x-a)^2)

where x is the independent var., y is the dependent var. a, b, and r are the fitting parameters. (and the initial value of parameter are set x=-1, y=-1, and r=1, separately.)

after set, I try to run the non-linear curve fitting by this function

but the fitting function doesn't work, the fitting parameter are unreasonable, there is even no fitting line on the result graph!

have anyone ever met the same problem before?

could you give some hint?

I'll very appreciate it.

Hideo Fujii

USA
1582 Posts

Posted - 05/25/2012 :  09:59:55 AM  Show Profile  Edit Reply  Reply with Quote  View user's IP address  Delete Reply
Hi taufiki1029,

> y = b + sqrt(r^2-(x-a)^2)
> a, b, and r are the fitting parameters.
> the initial value of parameter are set x=-1, y=-1, and r=1

So, you didn't give the initial parameter values for a and b?
If you didn't, you need them. (Seems your r's initial value is too small.
If I were, I would try r=400000, and a=0 , b=-400000 . )

Hope this helps.

--Hideo Fujii
OriginLab

Edited by - Hideo Fujii on 05/25/2012 10:01:34 AM
Go to Top of Page

taufiki1029

Taiwan
2 Posts

Posted - 05/27/2012 :  02:56:17 AM  Show Profile  Edit Reply  Reply with Quote  View user's IP address  Delete Reply
Thanks foy your reply, Hideo Fujii,

I follow your suggestion to change my initial parameter values and try to fit again.

at first run, the Origin tell me to fix the a = 0 and try again

I follow it,

but in the second run, the result seems doesn't like what I want,



I don't know what is the problem?

Do I just keep changing the initial values, keep try and error?

or something I can modify?

thanks to your kindness again.
Go to Top of Page

Hideo Fujii

USA
1582 Posts

Posted - 05/29/2012 :  4:02:11 PM  Show Profile  Edit Reply  Reply with Quote  View user's IP address  Delete Reply
Hi taufiki1029,

As I rescaled both X and Y of your graph to have the same scales (see Graph1 in the screenshot),
I noticed that your data points are on a almost vertical line - therefore the
radius may be huge. Maybe that's the reason why Origin's fitter had a hard time.
As an experimented, I rescaled X divided by 20, Y divided by 1000, and performed to
fit, and got a good result (of course, the curve is elliptic, not circular because of
the different rescaling factors).



Hope you can success by taking account with the above.

--Hideo Fujii
OriginLab
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