FilterRules

FilterRules[rules,patt]
filters the list rules by picking out only those rules whose left-hand sides match patt.

FilterRules[rules,{patt1,patt2,}]
picks out rules whose left-hand sides match any of the patti.

DetailsDetails

  • The rules in the list rules can be either -> or :> rules.
  • If any of the patti is a rule of the form lhs->rhs, then it is treated the same as lhs.
  • If patti is a string, it will also match a symbol whose name is the string.
  • FilterRules[rules,Except[patt]] gives all rules except those whose left-hand sides match patt.

ExamplesExamplesopen allclose all

Basic Examples  (2)Basic Examples  (2)

In[1]:=
Click for copyable input
Out[1]=

Filter for options that appear in Plot:

In[1]:=
Click for copyable input
Out[1]=
Introduced in 2007
(6.0)
Translate this page: