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

  • $\begingroup$ Look up Replace in the help. $\endgroup$ – Jonathan Shock Sep 15 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 Sep 15 at 15:03

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

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

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