Getting Started Documentation Glish Learn More Programming Contact Us
Version 1.9 Build 1556
News FAQ
Search Home


next up previous contents index
Next: functional.done - Function Up: functional - Tool Previous: functional.cfdf - Function


functional.add - Function



Package utility
Module functionals
Tool functional


Add a functional to a combi or compound functional


Synopsis
add(x)


Arguments

x in functional to be added
    Allowed: functional


Returns
bool


Description

Add another functional to a combi or compound functional.



Example
- a:=dfs.poly(2,[1,2,3])        # a polynomial
- a.f(1)                        # its value at x=1
6 
- b:=dfs.gaussian1d(10, 0.5, 1) # a Gaussian with height, center, width
- b.f(1)
5 
- c:=dfs.combi(); c.add(a); c.add(b)  # combine them
T 
T 
- c.f(1)                        # value is the sum (default
parameters are 1)
11 
- c.setpar(1, 2.5)              # set the first parameter of combi
to 2.5
[2.5 1]  
- c.f(1)                        # now value is 2.5*poly + 1*gauss
20





next up previous contents index
Next: functional.done - Function Up: functional - Tool Previous: functional.cfdf - Function   Contents   Index
Please send questions or comments about AIPS++ to aips2-request@nrao.edu.
Copyright © 1995-2000 Associated Universities Inc., Washington, D.C.

Return to AIPS++ Home Page
2006-10-15