Predefined Functions – cabs
| Function name: | cabs – Calculate modulus |
| Synopsis: | cabs(x) |
| Input data type | Output data type |
|---|---|
| real | real |
| complex | real |
| quaternion | real |
Description:
cabs calculates the modulus of the complex number, i.e.
cabs(4)=sqrt(4*4+0+0)=4
cabs(-4)=sqrt(-4*-4+0*0)=4
cabs( 3+4i) = sqrt(3*3+4*4)=5