| Author |
Comment/Response |
David Glick
|
12/29/01 10:56am
The following rule replaces each member of the list with the number plus 1.
In[3]:=
list1={1,2,3,4};
list1/.{x_ ->x+1}
Out[4]=
{2,3,4,5}
Please let me know why next code does not replace each member of the list with the number 7
In[5]:=
list1/.{x_ ->7}
Out[5]=
7
How would I rewrite this rule to get each list member replaced by 7.
Thanks for your help
David Glick
Attachment: rule.nb, URL: , |
|