T O P I C R E V I E W |
chrothenbach |
Posted - 10/21/2009 : 11:54:15 AM Origin Ver. and Service Release: V7.5885 (B885) Operating System: Vista
For my PhD project I need to fit some curves to a function. I tried all the formulas that come within OriginPro and the best fit I could achieve was with the ECS formula, but I do not believe it is exactly what I need.
What I need is some sort of Sin*Cos, which comes from solving the electrical field for a diffraction grating using Maxwell's Equations. This formula should be of the form:
y=C*Sin(A*x)*Cos(Pi*B*x).
A,B,C are parameters that I do not know the values for.
How can I define a formula for that? I tried to do it myself and miserably failed. Can someone give me a hand here?
-Christian |
4 L A T E S T R E P L I E S (Newest First) |
easwar |
Posted - 10/21/2009 : 1:14:01 PM Hi,
In your 7.5 installation, look at this help topic: Analysis: Curve Fitting>The NLSF Advanced Fitting Tool>User-Defined Fitting Functions> to learn more about creating user-defined functions.
Easwar OriginLab |
chrothenbach |
Posted - 10/21/2009 : 12:56:14 PM thanks for the reply...
Could I create a fdf file? I am not very familiar on how to use a C file yet, and I also do not know how to use a C file when curve fitting.
Do I have to define variables? |
easwar |
Posted - 10/21/2009 : 12:19:08 PM quote: Originally posted by chrothenbach
y=(C*Sin(A*x)*Cos(Pi*B*x))^2 should be the correct formula.
Hi,
By default Origin C is used when defining a new fitting function. And Origin C is case sensitive, so instead of Sin() need to use sin().
So try changing your function definition to: y=(C*sin(A*x)*cos(Pi*B*x))^2;
Pi is okay, as pi, Pi and PI are all predefined.
You can click the Edit in Code Builder button and then try compiling the code to get error messages that can then tell what is wrong.
Easwar OriginLab |
chrothenbach |
Posted - 10/21/2009 : 12:00:45 PM y=(C*Sin(A*x)*Cos(Pi*B*x))^2 should be the correct formula.
|