NMinimize::lvar NMaximize::lvar
Details
-
- This message is generated when the second argument in NMinimize or NMaximize is not a list of valid variables or a list of valid variables with upper and lower bounds for each variable.
- Symbols and expressions that do not have some other meaning are usually valid variables. Numbers, strings, lists, inequalities, sums, powers, and products are not valid variables.
- Upper and lower bounds for a variable are specified using a list, such as {x,1,2}.
- Off[message] switches off the message; On[message] switches it on. For example: Off[NMinimize::lvar].
Examples
Basic Examples (1)
The second argument of NMinimize is invalid:
NMinimize[x ^ 2, {x ≥ 3}]This shows a correct use of NMinimize:
NMinimize[{x ^ 2, x ≥ 3}, {x}]