[proFit-list] (no subject)

Peter Amrhein peter at quansoft.com
Tue Feb 1 15:16:07 CST 2011


Dear Geoff

You can find details about various commands in pro Fit by searching for it in the "Help" menu of pro Fit.
Even more easy and direct help you get by pressing the Option key while double-clicking onto the command name in the function window (see below the help information for the command "Optimize").
Please note that each optional parameter to such a command is a pair of a parameter name and a parameter value.

The command "Optimize" is varying the active parameters of your function until a maximum or minimum return value is reached. In order to search for the maximum, you would call e.g. "Optimize(getMinimum false);". In your example, the line "F:=(findMaximum);" doesn't do anything, i.e. it just assigns the value of the constant "findMaximum" to the variable "F"; this constant is used with the command "Analysis" and has nothing to do with the command "Optimize".

Hope this helps.

Best regards, Peter

Peter Amrhein
Quantum Soft

>>>>>>>>>>>>
Optimize

procedure Optimize (optional parameter list)

Finds a maximum or minimum of a function by varying its x-value and/or its parameters. Parameters:

function (string): Function to be fitted. Omit for current function.

getMinimum (boolean): true to find the function's minimum, false for its maximum.

varyParams (boolean): true for varying the function's parameters. (Only the active parameters of the function are varied.)

varyX (boolean): true for varying the function's x-value.

xValue (real): If "varyX" is false, this parameter gives the value of the function's x-value. If "varyX" is true, it gives the starting value for x.

precision (real): Desired precision. 0 for best precision, 1e-7 for medium precision, 1e-2 for low precision.

fullDescription (boolean): true to print a complete protocol in the results window, false if only the resulting parameters, x- and y-values are to be printed.

printResults (boolean): True for printing results. Default: false.

To retrieve the results of a call to procedure Optimize, call the function GetResult. Use one of the following selectors:

optimizedX: the optimized x-value

optimizedY: the optimized x-value

fittedParameter: the optimized parameters. Pass parameter index (1 based) as second argument to GetResult

The following example finds the minimum of the current function by varying its x-value and its active parameters, then prints the optimized value of the second parameter:

Optimize(xValue 0, precision 0, getMinimum true,
varyParams true, varyX true);
Writeln(GetResult(fittedParameter, 2));

<<<<<<<<<<<<

 
On 01.02.2011, at 12:13, Geoff Parker wrote:

> Hi,
> 
> I have used proFit for many years and it is great for my purposes.  I have version 6.1.12.
> 
> Can anyone help me here - the solution must be very simple!
> 
> I have laboured long trying to find our how, in programming, I set the limit for finding a maximum.  I am developing a program which calls up a function 'combat2'.  I have the following:
> 
> SelectFunction('combat2');
>         Optimize(xValue xMin, precision 0);
>      F:=(findMaximum);
> 
> This lets me set the minimum for the range to find the maximum as xMin - but how do I set the maximum?  If I write
> Optimize(xValue xMin,xMax, precision 0);
> I get an error message asking for "Parameter name expected" for xMax.
> 
> Best wishes,
> 
> Geoff
> -- 
> ============================================================
> 
> Geoff Parker FRS
> Emeritus Professor                  Phone:  home    0151 3364202
> Institute of Integrative Biology                    mobile  07973 247877
> Biosciences Building
> Crown Street                            email   gap at liv.ac.uk
> University of Liverpool
> LIVERPOOL L69 7ZB
> 
> ============================================================
> _______________________________________________
> proFit-list mailing list
> proFit-list at quantum-soft.com
> http://quantum-soft.com/mailman/listinfo/profit-list_quantum-soft.com

-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://quantum-soft.com/pipermail/profit-list_quantum-soft.com/attachments/20110201/bd29d2f0/attachment.html>


More information about the proFit-list mailing list