imaginaryPart - Maple Help
For the best experience, we recommend viewing online help using Google Chrome or Microsoft Edge.
Our website is currently undergoing maintenance, which may result in occasional errors while browsing. We apologize for any inconvenience this may cause and are working swiftly to restore full functionality. Thank you for your patience.

Online Help

All Products    Maple    MapleSim


ComplexNumeric.imaginaryPart

return the imaginary component of the ComplexNumeric object

 

Calling Sequence

Description

Examples

Calling Sequence

Numeric imaginaryPart() throws MapleException

Description

• 

The imaginaryPart function returns a Numeric object, which represents the imaginary part of the ComplexNumeric.

• 

To access the real component of the ComplexNumeric, use the realPart method.

Examples

import com.maplesoft.openmaple.*;

import com.maplesoft.externalcall.MapleException;

class Example

{

    public static void main( String notused[] ) throws MapleException

    {

        String[] mapleArgs = { "java" };

        Engine engine = new Engine( mapleArgs, new EngineCallBacksDefault(), null, null );

        ComplexNumeric n1 = (ComplexNumeric)engine.evaluate( "10+20*I:" );

        System.out.println( n1 );

        Numeric im = n1.imaginaryPart();

        System.out.println( im );

    }

}

Executing this code produces the following output.

10+20*I

20

See Also

ExternalCalling/Java/MapleException

OpenMaple

OpenMaple/Java/API

OpenMaple/Java/ComplexNumeric

OpenMaple/Java/ComplexNumeric/realPart

OpenMaple/Java/Numeric

 


Download Help Document