Differences
This shows you the differences between two versions of the page.
| Next revision | Previous revision | ||
| documentation:language_reference:objects:responsefunction:operations:add [2024/12/17 16:06] – created Maurits W. Haverkort | documentation:language_reference:objects:responsefunction:operations:add [2025/11/20 04:20] (current) – external edit 127.0.0.1 | ||
|---|---|---|---|
| Line 3: | Line 3: | ||
| ### | ### | ||
| - | alligned paragraph text | + | Response functions can be summed using " |
| ### | ### | ||
| - | ===== Example ===== | + | ==== Example |
| + | <code Quanty | ||
| + | a1 = {0, -1,-0.5, 0 } | ||
| + | b1 = { 0.1, 0.1, 0.1} | ||
| + | G1 = ResponseFunction.New( {a1,b1,mu=0,type=" | ||
| - | ### | + | a2 = {0, 0.5, 1, 1.5} |
| - | description text | + | b2 = { 0.1, 0.1, 0.1} |
| - | ### | + | G2 = ResponseFunction.New( {a2, |
| - | ==== Input ==== | + | G = G1 + G2 |
| - | <code Quanty Example.Quanty> | + | |
| - | -- some example code | + | print(" |
| + | print(G) | ||
| + | omega = 1.1 | ||
| + | Gamma = 0.001 | ||
| + | print() | ||
| + | print(" | ||
| </ | </ | ||
| + | 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 } | ||
| - | ==== Result ==== | + | Evaluated at omega = 1.1 and Gamma = 0.001 yields |
| - | <file Quanty_Output> | + | G ( (1.1176700531176 - 0.0055234547287253 I) ) = G1 ( (0.20102811094226 - 7.2191421442561e-05 I) ) + G2( (0.91664194217538 - 0.0054512633072828 I) ) |
| - | text produced as output | + | |
| </ | </ | ||
| ===== Table of contents ===== | ===== Table of contents ===== | ||
| - | {{indexmenu> | + | {{indexmenu> |