Main Content

C2000 Trig Fcn IQN

Sine, cosine, or arc tangent of IQ number

Library

Embedded Coder® Support Package for Texas Instruments™ C2000™ Processors/ Optimization/ C28x IQmath

Embedded Coder Support Package for Texas Instruments C2000 F28M3x Concerto™ Processors Processors/ Optimization/ C28x IQmath

Description

This block calculates basic trigonometric functions and returns the result as an IQ number. Valid Q values for _IQsinPU and _IQcosPU are 1 to 30. For all others, valid Q values are from 1 to 29.

Note

The implementation of this block does not call the corresponding Texas Instruments library function during code generation. The TI function uses a global Q setting and the MathWorks® code used by this block dynamically adjusts the Q format based on the block input. See Using the IQmath Library for more information.

Parameters

Function

Type of trigonometric function to calculate:

  • _IQsin — Compute the sine (sin(A)), where A is in radians.

  • _IQsinPU — Compute the sine per unit (sin(2*pi*A)), where A is in per-unit radians.

  • _IQcos — Compute the cosine (cos(A)), where A is in radians.

  • _IQcosPU — Compute the cosine per unit (cos(2*pi*A)), where A is in per-unit radians.

References

For detailed information on the IQmath library, see the user's guide for the C28x IQmath Library - A Virtual Floating Point Engine, Literature Number SPRC087, available at the Texas Instruments Web site. The user's guide is included in the zip file download that also contains the IQmath library (registration required).