Table of Contents
Add
Response functions can be summed using “+”
Example
- Example.Quanty
a1 = {0, -1,-0.5, 0 } b1 = { 0.1, 0.1, 0.1} G1 = ResponseFunction.New( {a1,b1,mu=0,type="ListOfPoles", name="G1"} ) a2 = {0, 0.5, 1, 1.5} b2 = { 0.1, 0.1, 0.1} G2 = ResponseFunction.New( {a2,b2,mu=0,type="ListOfPoles", name="G2"} ) G = G1 + G2 print("The response function of G is") print(G) omega = 1.1 Gamma = 0.001 print() print("Evaluated at omega =",omega," and Gamma =",Gamma," yields\nG (",G(omega,Gamma),") = G1 (",G1(omega,Gamma),") + G2(",G2(omega,Gamma),")")
yields the output
The response function of G is { { 0 , -1 , -0.5 , 0 , 0.5 , 1 , 1.5 } , { 0.1 , 0.1 , 0.1 , 0.1 , 0.1 , 0.1 } , name = G1 , mu = 0 , type = ListOfPoles } Evaluated at omega = 1.1 and Gamma = 0.001 yields G ( (1.1176700531176 - 0.0055234547287253 I) ) = G1 ( (0.20102811094226 - 7.2191421442561e-05 I) ) + G2( (0.91664194217538 - 0.0054512633072828 I) )