T O P I C R E V I E W |
jsilverstein |
Posted - 10/10/2012 : 11:51:11 AM Origin Ver. and Service Release (Select Help-->About Origin): 8.6 (64 bit) Operating System: Windows 7
Hi all
I have a fitting function that requires user inputted data and currently I am changing the code each time, but I'd rather have a dialog box that prompts for the entry of these numbers each time the program runs. The trick is not having it inside the loop, where it'll repeat many times.
I'm looking for input boxes for w1, w2, and B
My code:
//---------------------------------------------------------- // void _nlsfDiffusionRelaxation( // Fit Parameter(s): double D, double Fa, double Fb, // Independent Variable(s): double t, // Dependent Variable(s): double& An) { // Beginning of editable part double w1; double w2; double B; double A; w1=1.549*10^-6; w2=0.099; B=7.934*10^-5; double Sum; Sum=0; for(int n = 0; n < 50; n++) { A=(w1*t+w2*(1-exp(-B*t))); Sum +=(((-1)^n)/(2*n+1)*exp(-(D*t*(((2*n+1)*PI)/(2*0.011)^2)))); An=Fa*(1-(4/PI)*Sum)+Fb*A; } // End of editable part }
Thanks in advance
|
1 L A T E S T R E P L I E S (Newest First) |
Penn |
Posted - 10/10/2012 : 11:49:58 PM Hi,
For allowing user to input w1, w2 and B, the simple solution is to set these as fitting parameters, and then fix them with the desired values, that is to say, user can specify their values accordingly. Please see the following image on how to fix the values.
Penn |
|
|