Hi guys I have a expression like this one :
Q[r_ , ri_] := {DiracDelta[r - ri], 5*DiracDelta[r - ri] , DiracDelta[r - ri]^2 , Derivative[1][DiracDelta][r - ri]}
my ri is a list of following numbers: ri = {-0.5 , -0.2 , 0.5 , 0.5} now I want to introduce a new symbolic function as S[r_ , ri[ which is the same like Q[r , ri_] but with some chamges in the expressions. So I used this command:
For[i = 1 , i <= FromDigits[Dimensions[Q[r , ri]]] , i++ ,
QI[r , ri[[i]]] =
Q[r , ri[[i]]] /.
DiracDelta[r - ri[[i]]] -> HeavisideTheta[r - ri[[i]]]]
But the Problem is the for loop function just applys the changes of the last iteration and does not save the loop after each turn. Since this is so important for me, any possible answers are appreciable.