MATLAB Examples

Accelerate fixed-point algorithms using fiaccel function. You generate a MEX function from MATLAB® code, run the generated MEX function, and compare the execution speed with MATLAB code

Set fixed-point data types by instrumenting MATLAB® code for min/max logging and using the tools to propose data types.

Convert a textbook version of the Fast Fourier Transform (FFT) algorithm into fixed-point MATLAB® code.

Convert a finite impulse-response (FIR) filter to fixed point by separating the fixed-point type specification from the algorithm code.

Compute and compare the statistics of the signal quantization error when using various rounding methods.

Compute square root using a CORDIC kernel algorithm in MATLAB®. CORDIC-based algorithms are critical to many embedded applications, including motor controls, navigation, signal

Use the CORDIC algorithm, polynomial approximation, and lookup table approaches to calculate the fixed-point, four quadrant inverse tangent. These implementations are approximations

Use both CORDIC-based and lookup table-based algorithms provided by the Fixed-Point Designer™ to approximate the MATLAB® sine (SIN) and cosine (COS) functions. Efficient fixed-point

Write MATLAB® code that works for both floating-point and fixed-point data types. The algorithm used in this example is the QR factorization implemented via CORDIC (Coordinate Rotation

Develop and verify a simple fixed-point algorithm.

Compute sine and cosine using a CORDIC rotation kernel in MATLAB®. CORDIC-based algorithms are critical to many embedded applications, including motor controls, navigation, signal

Implement fixed-point square root using a lookup table. Lookup tables generate efficient code for embedded devices.

Convert Cartesian to polar coordinates using a CORDIC vectoring kernel algorithm in MATLAB®. CORDIC-based algorithms are critical to many embedded applications, including motor

Normalize data for use in lookup tables.

Implement fixed-point log2 using a lookup table. Lookup tables generate efficient code for embedded devices.

Define unsigned and signed two's complement integer and fixed-point numbers.

Analyze a fixed-point state-space system to detect limit cycles.

Perform basic fixed-point arithmetic operations.

The basics of how to use the fixed-point numeric object fi.

Perform binary point scaling in FI.

Set fixed point math attributes in MATLAB® code.

This demo introduces user to the new and enhanced bitwise operators provided in Fixed Point toolbox in R2007b. These functions are supported by Embedded MATLAB block for both software and

This demo shows how a fixed-point cordic algorithm to calculate a phase from polar coordinates (arctan) can be implemented in MATLAB.

Choose a web site to get translated content where available and see local events and offers. Based on your location, we recommend that you select: .

You can also select a web site from the following list:

Select the China site (in Chinese or English) for best site performance. Other MathWorks country sites are not optimized for visits from your location.

Contact your local office