FeResPost Web Site                     FeResPost Online User Manual

I.4.9.5 Assembling Complex from Real Results

The “assembleComplex” method is used to assemble a Complex Result object from two Real Results. The method is called on a Result object and has three arguments:

1.

An integer corresponding to the format of the new Complex Result. The accepted values are 2 (real-imaginary or rectangular format) or 3 (polar or magnitude-phase format).

2.

A first Result object that will correspond to the real or magnitude components of the assembled Result.

3.

A second Result object that will correspond to the imaginary or phase components of the assembled Result.

Note that the two Result arguments must satisfy several requirements:

An example of valid (but not very useful) call to “assembleComplex” follows:

    resR=res2.getR
    resI=res2.getI

    resRI=Result.new
    resRI.assembleComplex(2,resR,resI)

(At the end, resRI should be the same as res2.)