# Variables input generation for Minimization in High dimensional space [duplicate]

I'm currently doing optimization in a high dimensional space. I was thinking of giving FindMinimum (or NMinimize not certain yet) a shot, however what bugs me is how I can state the command, given that its input a vector of size ~200.

Most examples for FindMinimum have functions of at most 2 variables.

Now I've seen this answer on StackOverflow where the user generates all his variables using

vars = Array[Symbol["x$" <> ToString[#]] &, n];  However reading the comments showed that there were certain concerns with this method: I would not recommend doing it in a program, but it is safe to do in an interactive session. So is this standard, or is there a more clever solution to get to it ? • Also check out Making Definitions for Indexed Objects – shrx Dec 11 '15 at 10:56 • @shrx It is not about assigning. Creation of symbols is solved, comment's to linked answer are OP's concern. – Kuba Dec 11 '15 at 17:07 • @Kuba in that case I'm retracting my vote to close. – shrx Dec 11 '15 at 17:09 ## 1 Answer The point being made in the quoted answer was to not use the name$number convention, because Module usues it, and who knows what conflicts might happen internally if you were to generate such variables. Using x$s in place of x$ would be fine.

• Using Unique would also be acceptable. – Oleksandr R. Dec 12 '15 at 1:42