0
$\begingroup$

I would like to assign my result from equation. I tried /. and := but it gives me empty variable. How can i fix it?

enter image description here

$\endgroup$
1
$\begingroup$

You actually have to set phi c, as in

c = c /. Solve[... , c]
| improve this answer | |
$\endgroup$
  • $\begingroup$ Thanks that works. I have one more question, if i have two variables for example {a,b} = {a,b}/. Solve[... , {a,b}] is that correct assignment ? $\endgroup$ – Papa Apr 2 at 20:57
  • 1
    $\begingroup$ Not really, because there may be multiple solutions, for example with x = x /. Solve[x^2 + a x + 1 == 0, x] the result is a list of solutions. $\endgroup$ – Chris Degnen Apr 2 at 22:26
  • $\begingroup$ But if am sure that there would be one solution for a and one for b? $\endgroup$ – Papa Apr 2 at 22:28
  • 1
    $\begingroup$ More like {{a,b}} = {a,b}/. Solve[... , {a,b}] though. $\endgroup$ – Chris Degnen Apr 2 at 22:31
  • 1
    $\begingroup$ For example, {{x, y}} = {x, y} /. Solve[a x + y == 7 && b x - y == 1, {x, y}] $\endgroup$ – Chris Degnen Apr 2 at 22:33

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