Origin Ver. and Service Release (Select Help-->About Origin): 9.0.0 SR2
Operating System: Windows 7
I am having great difficulty figuring out how to use Origin C to get the correct parameter initialization I need. I have very little experience with the C language.
So I have defined a user fitting function, say y = A*exp(k*x) and I have specified both A and k as parameters while x is my independent variable. In the Function Builder, under the Parameters tab I have specified k = 1 for initial value (not fixed) and A = "--" (nothing) and is fixed. I need parameter A to initialize as the 'yatxmax' value of my X&Y data of the active worksheet, but once it initializes it needs to become a fixed parameter.
Thus, for my initialization code I have tried the following:
Curve crv("Data1_A","Data1_B"); //hopefully this is the right code that says 'use data from column A and column B in active worksheet'
A = yatxmax(crv); //this should initialize A as yatxmax
Of course this doesn't work...It tells me that A is not properly initialized. That is probably because I used a "--" as the value in the Parameters tab. If I input a value in the Parameters tab it overrides the "yatxmax" initialization.
Is there some way I can use the initialization code to fix this parameter after 'yatxmax' initialization without checking the "Fixed" box in the Parameters tab in Function Builder?
Thanks for any help!