[proFit-list] Dynamically Adding Variables
pro Fit Support
profit at quansoft.com
Mon Jun 1 22:37:34 CDT 2009
Yes, you can do that. Basically, you call SetFunctionProperties for
nrParameters in Check. Here is an example, which basically sets the
number of parameters to the value you enter in a.
if pNumber = 1 then // if a has changed
if (a < 1) or (a > 100) then
Check := bad
SetFunctionProperties(function '', nrParams a+1);
Check := update; // redraw the parameter window
y := 0;
for i := 1 to a do
y := x*y + a[i+1];
You can also set the names of the parameters using
On 1. Jun 2009, at 18:21, Andrew Cameron Beveridge wrote:
> I would like to make a function where I can dynamically add variables;
> like the "polynomial" and "peaks" function. In those functions you can
> specify the the number of peaks or the order of the polynomial.
> Is there anyway to write a function that does this. I cannot find it
> the manual.
> Thanks for your help.
> Andrew C Beveridge
> MS M888
> Los Alamos National Laboratory
> Los Alamos, NM 87545
> proFit-list mailing list
> proFit-list at quantum-soft.com
More information about the proFit-list