<html><head><base href="x-msg://1234/"></head><body style="word-wrap: break-word; -webkit-nbsp-mode: space; -webkit-line-break: after-white-space; ">Dear Geoff<div><br></div><div>You can find details about various commands in pro Fit by searching for it in the "Help" menu of pro Fit.</div><div>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 <u>below</u> the help information for the command "Optimize").</div><div>Please note that each optional parameter to such a command is a pair of a parameter name and a parameter value.</div><div><br></div><div>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".</div><div><br></div><div>Hope this helps.</div><div><br></div><div>Best regards, Peter</div><div><br></div><div>Peter Amrhein</div><div>Quantum Soft</div><div><br></div><div>>>>>>>>>>>>></div><span class="Apple-style-span" style="font-family: Helvetica, Geneva; font-size: 12px; line-height: 14px; "><h2 style="color: rgb(0, 0, 255); font-weight: bold; font-size: 14px; font-family: Arial, Helvetica, Geneva; ">Optimize</h2><p style="font-size: 12px; line-height: 14px; font-family: Helvetica, Geneva; "><b><b>procedure Optimize (<a href="file:///Users/peter/Documents/Develop/proFit/pro%20Fit%206.2.0%20Development/profit/trunk/build/Development/pro%20Fit.app/Contents/Resources/English.lproj/pro%20Fit%20Help/prg/pgs/Pascal/Optional_parameter_list.html" style="color: rgb(51, 102, 204); text-decoration: none; ">optional parameter list</a>)</b></b></p><p style="font-size: 12px; line-height: 14px; font-family: Helvetica, Geneva; ">Finds a maximum or minimum of a function by varying its x-value and/or its parameters. Parameters:</p><blockquote><p style="font-size: 12px; line-height: 14px; font-family: Helvetica, Geneva; "><b>function</b> (string): Function to be fitted. Omit for <a href="file:///Users/peter/Documents/Develop/proFit/pro%20Fit%206.2.0%20Development/profit/trunk/build/Development/pro%20Fit.app/Contents/Resources/English.lproj/pro%20Fit%20Help/prg/pgs/Reference/Current_function.html" style="color: rgb(51, 102, 204); text-decoration: none; ">current</a> function.</p><p style="font-size: 12px; line-height: 14px; font-family: Helvetica, Geneva; "><b>getMinimum</b> (boolean): true to find the function's minimum, false for its maximum.</p><p style="font-size: 12px; line-height: 14px; font-family: Helvetica, Geneva; "><b>varyParams</b> (boolean): true for varying the function's parameters. (Only the active parameters of the function are varied.)</p><p style="font-size: 12px; line-height: 14px; font-family: Helvetica, Geneva; "><b>varyX</b> (boolean): true for varying the function's x-value.</p><p style="font-size: 12px; line-height: 14px; font-family: Helvetica, Geneva; "><b>xValue</b> (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.</p><p style="font-size: 12px; line-height: 14px; font-family: Helvetica, Geneva; "><b>precision</b> (real): Desired precision. 0 for best precision, 1e-7 for medium precision, 1e-2 for low precision.</p><p style="font-size: 12px; line-height: 14px; font-family: Helvetica, Geneva; "><b>fullDescription</b> (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.</p><p style="font-size: 12px; line-height: 14px; font-family: Helvetica, Geneva; "><b>printResults</b> (boolean): True for printing results. Default: false.</p></blockquote><p style="font-size: 12px; line-height: 14px; font-family: Helvetica, Geneva; ">To retrieve the results of a call to procedure <a href="file:///Users/peter/Documents/Develop/proFit/pro%20Fit%206.2.0%20Development/profit/trunk/build/Development/pro%20Fit.app/Contents/Resources/English.lproj/pro%20Fit%20Help/prg/pgs/Reference/Optimize.html" style="color: rgb(51, 102, 204); text-decoration: none; ">Optimize</a>, call the function <a href="file:///Users/peter/Documents/Develop/proFit/pro%20Fit%206.2.0%20Development/profit/trunk/build/Development/pro%20Fit.app/Contents/Resources/English.lproj/pro%20Fit%20Help/prg/pgs/Reference/GetResult.html" style="color: rgb(51, 102, 204); text-decoration: none; ">GetResult</a>. Use one of the following selectors:</p><blockquote><p style="font-size: 12px; line-height: 14px; font-family: Helvetica, Geneva; "><b>optimizedX</b>: the optimized x-value</p><p style="font-size: 12px; line-height: 14px; font-family: Helvetica, Geneva; "><b>optimizedY</b>: the optimized x-value</p><p style="font-size: 12px; line-height: 14px; font-family: Helvetica, Geneva; "><b>fittedParameter</b>: the optimized parameters. Pass parameter index (1 based) as second argument to GetResult</p></blockquote><p style="font-size: 12px; line-height: 14px; font-family: Helvetica, Geneva; ">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:</p><p style="font-size: 12px; line-height: 14px; font-family: Helvetica, Geneva; "><code>Optimize(xValue 0, precision 0, getMinimum true,<br>varyParams true, varyX true);<br>Writeln(GetResult(fittedParameter, 2));</code></p></span><div><<<<<<<<<<<<</div><div><br></div><div> </div><div><div><div>On 01.02.2011, at 12:13, Geoff Parker wrote:</div><br class="Apple-interchange-newline"><blockquote type="cite"><span class="Apple-style-span" style="border-collapse: separate; font-family: Helvetica; font-style: normal; font-variant: normal; font-weight: normal; letter-spacing: normal; line-height: normal; orphans: 2; text-indent: 0px; text-transform: none; white-space: normal; widows: 2; word-spacing: 0px; -webkit-border-horizontal-spacing: 0px; -webkit-border-vertical-spacing: 0px; -webkit-text-decorations-in-effect: none; -webkit-text-size-adjust: auto; -webkit-text-stroke-width: 0px; font-size: medium; "><div><div>Hi,</div><div><br></div><div>I have used proFit for many years and it is great for my purposes.  I have version 6.1.12.</div><div><br></div><div>Can anyone help me here - the solution must be very simple!</div><div><br></div><div>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:</div><div><br></div><div><tt><font color="#009933">SelectFunction</font><font color="#000000">(</font><font color="#666666">'combat2'</font><font color="#000000">);</font></tt></div><div><tt><font color="#000000"><x-tab>       <span class="Apple-converted-space"> </span></x-tab></font><font color="#009933">Optimize</font><font color="#000000">(xValue xMin, precision 0);<br><x-tab>    <span class="Apple-converted-space"> </span></x-tab>F:=(</font><font color="#CC6600">findMaximum</font><font color="#000000">);</font></tt></div><div><br></div><div>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</div><div><tt><font color="#009933">Optimize</font><font color="#000000">(xValue xMin,xMax, precision 0);</font></tt></div><div>I get an error message asking for "Parameter name expected" for xMax.</div><div><br></div><div>Best wishes,</div><div><br></div><div>Geoff</div><x-sigsep><pre>-- 
</pre></x-sigsep><div>============================================================<br><br>Geoff Parker FRS<br>Emeritus Professor<x-tab> <span class="Apple-converted-space"> </span></x-tab><x-tab>       <span class="Apple-converted-space"> </span></x-tab><x-tab>       <span class="Apple-converted-space"> </span></x-tab>Phone:<x-tab> <span class="Apple-converted-space"> </span></x-tab>home<x-tab>   <span class="Apple-converted-space"> </span></x-tab>0151 3364202<br>Institute of Integrative Biology<x-tab>   <span class="Apple-converted-space"> </span></x-tab><x-tab>       <span class="Apple-converted-space"> </span></x-tab><x-tab>       <span class="Apple-converted-space"> </span></x-tab>mobile<x-tab> <span class="Apple-converted-space"> </span></x-tab>07973 247877<br>Biosciences Building<br>Crown Street<x-tab>   <span class="Apple-converted-space"> </span></x-tab><x-tab>       <span class="Apple-converted-space"> </span></x-tab><x-tab>       <span class="Apple-converted-space"> </span></x-tab><x-tab>       <span class="Apple-converted-space"> </span></x-tab>email<x-tab>  <span class="Apple-converted-space"> </span></x-tab><a href="mailto:gap@liv.ac.uk">gap@liv.ac.uk</a><br>University of Liverpool<br>LIVERPOOL L69 7ZB<br><br>============================================================</div>_______________________________________________<br>proFit-list mailing list<br><a href="mailto:proFit-list@quantum-soft.com">proFit-list@quantum-soft.com</a><br><a href="http://quantum-soft.com/mailman/listinfo/profit-list_quantum-soft.com">http://quantum-soft.com/mailman/listinfo/profit-list_quantum-soft.com</a><br></div></span></blockquote></div><br></div></body></html>