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
 Problem with defined function
 New Topic  Reply to Topic
 Printer Friendly
Author Previous Topic Topic Next Topic Lock Topic Edit Topic Delete Topic New Topic Reply to Topic

guardian_angel

5 Posts

Posted - 03/05/2012 :  6:09:01 PM  Show Profile  Edit Topic  Reply with Quote  View user's IP address  Delete Topic
Origin Ver. and Service Release (Select Help-->About Origin): 8.0724
Operating System: Vista x64

I'd like to fit this function:
y=510/sqrt(510^2+(x*a-1/0,000000001*x)^2)
Are there any errors in this equation? I have these settings:
Function Type: User-Defined
Independent variables: x
Dependent variables: y
Parameter names: a
Function Form: Origin C

Compilation is okay.

After saving when I try to fit this function, there is nothing going on, I receive empty table.
"Fit till converge" says "Fit did not converge - reason unknown."

How am I supposed to fit this equation?






Hideo Fujii

USA
1582 Posts

Posted - 03/06/2012 :  10:00:24 AM  Show Profile  Edit Reply  Reply with Quote  View user's IP address  Delete Reply
Hi,

> I'd like to fit this function:
> y=510/sqrt(510^2+(x*a-1/0,000000001*x)^2)
> Function Type: User-Defined
> Independent variables: x
> Dependent variables: y
> Parameter names: a
> Function Form: Origin C
> Compilation is okay.

I suggest you to check the following:

1) Because this is in OriginC type, use the 510.0(real) instead of 510(integer).
2) As possibly comma(,) as a decimal point has not been set, try 0.000000001 instead of 0,000000001 .
3) For user-defined function as it doesn't have the parameter initialization routine, always make sure that before you start fitting, any parameter (in your case only a) shouldn't be a missing value, and you must give an appropriate initial value.

Hope this helps.

--Hideo Fujii
OriginLab
Go to Top of Page

Drbobshepherd

USA
Posts

Posted - 03/06/2012 :  10:26:10 AM  Show Profile  Edit Reply  Reply with Quote  View user's IP address  Delete Reply
Check your function. I do not think it is calculating the way you think it is. The rules of algebreic hierarchy dictate that the inner-most parenthetical expression will be calculated first,

(x*a-1/0,000000001*x).

The products and ratios will be evaluated from left to right, then the difference will be taken. So your inner-most expression will be

(xa-(1,0E9)x).

I suspect this is not the result you intended as 1/0,000000001 is an odd way of writing (1,0E9). As it stands, unless a is close to a billion, your formula is dominated by the second term in the inner-most expression.

DrBobShepherd
Go to Top of Page

guardian_angel

5 Posts

Posted - 03/06/2012 :  12:29:39 PM  Show Profile  Edit Reply  Reply with Quote  View user's IP address  Delete Reply
Thanks for quick replies but any of these hints work

This is for my physics report. I need to find amplitude-frequency chracteristics for series RLC circuit.
There is no problem at all with graph, it looks like in the picture


There is transmission coefficient (alfa) on y-axis, and frequency on x-axis. Now I need to do the fitting:

alfa = R/sqrt(R^2+(wL-1/wc)^2)

R = 510 ohm
C = 1*10-9 F
w = frequency (x)
L is parameter which I want to evaluate by fitting the function.
How would you do this?

Edited by - guardian_angel on 03/06/2012 12:31:18 PM
Go to Top of Page

Hideo Fujii

USA
1582 Posts

Posted - 03/06/2012 :  2:43:13 PM  Show Profile  Edit Reply  Reply with Quote  View user's IP address  Delete Reply
Hi,

It seems the parameter L only controls ONLY the peak position with the function:

alfa = R/sqrt(R^2+(w*L-(1/(w*c)))^2)

It seems that you need at least one more parameter to control the width of the peak. (Screenshot with L=0.10294)



--Hideo Fujii
OriginLab
Go to Top of Page

guardian_angel

5 Posts

Posted - 03/06/2012 :  4:02:57 PM  Show Profile  Edit Reply  Reply with Quote  View user's IP address  Delete Reply
So maybe there is some function that will only estimate the peak? This would be enough to calculate inductance L
Go to Top of Page

Hideo Fujii

USA
1582 Posts

Posted - 03/06/2012 :  5:55:38 PM  Show Profile  Edit Reply  Reply with Quote  View user's IP address  Delete Reply
such as fitting by Gauss with the bias term(y0)=0 fixed after converting to log values of W(X)??

--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