0
$\begingroup$

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], ...enter image description here

$\endgroup$
2
  • $\begingroup$ Look up Replace in the help. $\endgroup$ Commented 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$
    – Osama
    Commented Sep 15, 2020 at 15:03

1 Answer 1

2
$\begingroup$

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}
$\endgroup$
1
  • $\begingroup$ Thanks a lot for your help. The second part is what I am looking for. $\endgroup$
    – Osama
    Commented Sep 15, 2020 at 17:02

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.