# Modification of formulas without changing expression number

Posted 1 year ago
1383 Views
|
2 Replies
|
0 Total Likes
|
 I made a Original: In[1]=a+b In[2]=In[1]+3 .....If In[1] is modified to "a+b+2", In[1] is changed to In[3]. So, I have to collect In[2] to In[3]+3. All subsequent formulas have to be modified in the same way. Is there any way to change only the content of the expression without changing the expression number?
2 Replies
Sort By:
Posted 1 year ago
 Please check this note to know how to define your own function and change the parameter you needhttps://reference.wolfram.com/language/tutorial/FunctionsAndPrograms.html
 Hi h r,I'm not sure what you mean by "expression number".Are you trying to recursively define a function "In", so that In[i] depends on In[i-1] ? Or are you trying to define a List "In", so that In[[i]] depends on In[[i-1]] ? Note the syntax difference of single bracket "[" vs double bracket "[[". The latter refers to Part, and is defined here:https://reference.wolfram.com/language/ref/Part.html