Documentation

### This is machine translation

Translated by
Mouseover text to see original. Click the button below to return to the English version of the page.

# Manual Conversion

Manual floating-point algorithm to fixed-point algorithm conversion

## Functions

 `buildInstrumentedMex` Generate compiled C code function including logging instrumentation `showInstrumentationResults` Results logged by instrumented, compiled C code function `clearInstrumentationResults` Clear results logged by instrumented, compiled C code function
 `fi` Construct fixed-point numeric object `fimath` Set fixed-point math settings `numerictype` Construct numerictype object
 `zeros` Create array of all zeros with fixed-point properties `ones` Create array of all ones with fixed-point properties `cast` Cast variable to different data type

## Examples and How To

Manually Convert a Floating-Point MATLAB Algorithm to Fixed Point

Manually convert floating-point MATLAB algorithm to fixed point

Set Data Types Using Min/Max Instrumentation

This example shows how to set fixed-point data types by instrumenting MATLAB code for min/max logging and using the tools to propose data types.

Convert Fast Fourier Transform (FFT) to Fixed Point

This example shows how to convert a version of the Fast Fourier Transform (FFT) algorithm into fixed-point MATLAB code.

Detect Limit Cycles in Fixed-Point State-Space Systems

This example shows how to analyze a fixed-point state-space system to detect limit cycles.

Compute Quantization Error

This example shows how to compute and compare the statistics of the signal quantization error when using various rounding methods.

Implement FIR Filter Algorithm for Floating-Point and Fixed-Point Types using cast and zeros

This example shows you how to convert a finite impulse-response (FIR) filter to fixed point by separating the fixed-point type specification from the algorithm code.

## Concepts

Fixed-Point Conversion Workflows

Manual Fixed-Point Conversion Workflow

Overview of workflow for manual float-to-fixed conversion.

Manual Fixed-Point Conversion Best Practices

These best practices help you get from generic MATLAB® code to an efficient fixed-point implementation using the manual fixed-point conversion workflow.

## Troubleshooting

Decide Which Workflow Is Right For Your Application

Know When a Function is Supported for Instrumentation and Acceleration

How to find out which functions are supported for fixed-point conversion

What to Do If a Function Is Not Supported for Fixed-Point Conversion

How to deal with functions that are not supported for fixed-point conversion

fi*non-fi Errors

How to fix fi*non-fi errors

Data Type Mismatch Errors

How to fix data type mismatch errors

Mismatched fimath Errors

How to fix mismatched fimath errors

Get trial now