Skip to Main Content Skip to Search
Product Documentation

Examples


Use this list to find examples in the documentation.

Getting Started

Cast from Doubles to Fixed Point

Data Types and Scaling

Fixed-Point Format
Constant Scaling for Best Precision
Display Data Types for Ports in Your Model

Arithmetic Operations

Rounding to Zero Versus Truncation
Limitations on Precision and Errors
Maximize Precision
Saturation and Wrapping
Determine the Range of Fixed-Point Numbers
The Summation Process
Multiplication with Nonzero Biases and Mismatched Fractional Slopes
The Multiplication Process
The Division Process
Conversions and Arithmetic Operations

Realization Structures

Direct Form II
Series Cascade Form
Parallel Form

Producing Lookup Table Data

Approximate the Square Root Function
Create Lookup Tables for a Sine Function
Using errmax with Unrestricted Spacing
Using nptsmax with Unrestricted Spacing
Using errmax with Even Spacing
Using nptsmax with Even Spacing
Using errmax with Power of Two Spacing
Using nptsmax with Power of Two Spacing
How the Lookup Tables Determine Input Location
Interpolation for Each Lookup Table

Feedback Controller Simulation

About the Feedback Controller Example Model

Fixed Point Tool

Propose Data Types For a Model Using Results from Multiple Simulations

Writing S-Functions

Storage Containers in Simulation Example
Get the Input Port Data Type
Set the Output Port Data Type
Interpret an Input Value
Write an Output Value
Use the Input Data Type to Determine the Output Data Type

  


Related Products & Applications

Learn more about Simulink through this collection of videos, articles, technical literature and the Getting Started with Simulink Guide.

 © 1984-2012- The MathWorks, Inc.    -   Site Help   -   Patents   -   Trademarks   -   Privacy Policy   -   Preventing Piracy   -   RSS