Great day to all of you; how can I assign the results in the attached picture, which is obtained from a Solve command, to variables? i.e. I need the values of c[-3,-3], c[-3,-2], ...
$\begingroup$
$\endgroup$
2
-
$\begingroup$ Look up Replace in the help. $\endgroup$– Jonathan ShockCommented Sep 15, 2020 at 11:42
-
$\begingroup$ @JonathanShock, I tried to use Replace, but it does not work. Is it possible to send the file to you? $\endgroup$– OsamaCommented Sep 15, 2020 at 15:03
Add a comment
|
1 Answer
$\begingroup$
$\endgroup$
1
Are you trying to retrieve the values? E.g.,
vars = Catenate@Array[c, {6, 6}, {-3, -3}] (* your "variables" *)
rules = Thread[Rule[vars, RandomReal[{0, 1}, 36]]] (* example rules *)
vars /. rules (* retrieve values *)
Or did you want to make some kinds of assignments? (If so, which?) For example, if you really (are you sure?) need all those rules to become assignments, you could
rules /. {Rule -> Set}
-
$\begingroup$ Thanks a lot for your help. The second part is what I am looking for. $\endgroup$– OsamaCommented Sep 15, 2020 at 17:02