Given a list of symbols, say {y[x],z[x],k}
Is there a way to sort which depend on x
and which don't ?
Applied to the above list, the method would give:
{y[x],z[x]}
and {k}
Thanks in advance
Mathematica Stack Exchange is a question and answer site for users of Wolfram Mathematica. It only takes a minute to sign up.
Sign up to join this community
FreeQ[]
? $\endgroup$GatherBy[]
. $\endgroup$FreeQ[#, x] & /@{y[x], k, x}
could be enough for what I have in mind. Although, is there a way to explicitly check for[x]
's presence and rather thanx
? $\endgroup$_[x]
. $\endgroup$f[x,z]
also? It gets tricky? Function that depends onx
and other variables? $\endgroup$