0
$\begingroup$

Is there a good way to convert a linear replacement list into a list of the independent variables? For example, I would like to take {n1->n3+n4, n2->n3+2n4} and get {n3,n4}, the variables that n1 and n2 are expressed in terms of.

$\endgroup$
3
$\begingroup$
lst = {n1 -> n3 + n4, n2 -> n3 + 2 n4};

Variables[lst[[All, -1]]]

{n3, n4}

$\endgroup$

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.