Answered
colon expression to use integer operands
1) For embedded designs, if at all possible consider changing your design to work with revolutions instead of radians. 1 r...

5 months ago | 3

| accepted

Answered
How to use ssRegisterDataTypeInteger with Simulink Coder ?
Hi I've created an example for cases where the types can vary per instance of the s-function. The core of the s-function is co...

5 months ago | 0

| accepted

Answered
How to use ssRegisterDataTypeInteger with Simulink Coder ?
Hi A low effort way to inline an s-function is to use "wrapping". The general concept of "wrapping" an s-function is described...

5 months ago | 0

Answered
Compiler generated code for TI C2000 device errors with "floating constant is out of range"
Hi, Having a model that simulates with 64-bit floating-point doubles, but behaves as 32-bit floating-point on the target misses...

6 months ago | 0

Answered
Remove same types of Simulink blocks using commands
Automatically deleting lots of blocks from a model obviously involves risk, so save a backup and proceed at your own risk. The ...

7 months ago | 0

| accepted

Answered
FAQ: Why aren't boolean and 1 bit unsigned integers treated as the same data type?
Casting a numeric data type to boolean data type is very different from casting to any other numeric type. The following figure ...

8 months ago | 0

| accepted

Answered
How to prevent override with double data type on certain block when deriving simulation ranges with Fixed-point Tool
Too bad the prior approach was not sufficient. Another approach is to use Model Reference. Each parent and child in a Model Re...

8 months ago | 0

Answered
How to prevent override with double data type on certain block when deriving simulation ranges with Fixed-point Tool
The documentation discusses this here. I'll elaborate on that. To prevent Data Type Override from changing a numerictype, set ...

8 months ago | 0

Answered
Some forms of Simulink logging write 64 bit integers as fi objects. Does that mean I need a Fixed-Point Designer license?
As of R2017a, a Fixed-Point Designer license would NOT be required. As of R2017a, constructing a fi object whose type is equ...

9 months ago | 0

| accepted

Answered
int64 in simulink / stateflow?
Update: 64 bit integer modeling in Stateflow is now available. Stateflow C support of int64 and uint64 is available as of R2019...

9 months ago | 0

Answered
[Fixed-Point Toolbox] How to speed up fi object matrix multiplication?
Making simulation two orders of magnitude faster with fiaccel If the fixed-point code you are simulating is code generation com...

10 months ago | 0

Answered
Is it possible to pass and use hexadecimal values in simulink, without converting decimal?
If you are interested in entering parameters in hex or binary For MATLAB integer types, then as of R2019b, MATLAB has newly ad...

10 months ago | 0

Submitted


Tips and Tricks for 64 Bit Integers in Simulink pre-R2020a
Tips and Tricks for Using 64 Bit Integers in Simulink prior to R2020a

1 year ago | 2 downloads |

Answered
How to create 64 bit integer data type in Simulink
Hi Mikhail's instructions on registering a 64 bit integer type are spot-on. Nice job! Starting in R2017a, 64 bit integers in S...

1 year ago | 0

Answered
Why can't I use variables of type int64/uint64 as block parameter in Simulink?
In R2020a, Simulink parameters can now be entered using MATLAB built-in int64 and uint64 types. For example, you can directly e...

1 year ago | 0

Answered
Replace wide integer multiplication
Hi Leon, Solving the problem may be a simple as turning on support long long for the model. Please see this article. https://...

1 year ago | 0

Answered
What is the difference between the fixed point and floating point modeling in simulink ?
Design choices like where to use floating-point or fixed-point are about embedded implementation efficiency. Implementation eff...

1 year ago | 1

Submitted


Numeric Efficiency Examples
Examples of crafting numeric efficienct embedded designs using mixtures of fixed-point, floating-point and approximations.

1 year ago | 1 download |

Submitted


Tutorial on Simulink Data Type Propagation Engine
Tutorial on Simulink Data Type Propagation Engine

3 years ago | 1 download |

Answered
What is stored integer value of a fi object?
Please see https://www.mathworks.com/help/fixedpoint/ug/scaling_f6389.html

3 years ago | 0

Answered
How can I convert binary data into fixed point data
First, get the raw integer values in to MATLAB as either uint32 values or int32 values. Second, use the reinterpretcast funct...

3 years ago | 0

| accepted

Answered
Is it possible to force single precision instead of double precision when generating code from simulink?
Hi, This <https://www.mathworks.com/videos/data-type-exploration-and-visualization-of-signal-ranges-1506620567017.html video> s...

3 years ago | 2

Answered
Force single precision floating-point in generated c code
Hi, There is a Single Precision Converter tool that ships with Fixed-Point Designer that will automatically convert a subsys...

3 years ago | 2

Answered
How to get Port Data Type inside a Masked Block
Hi, There is no way to get this information up to the Mask initialization code a compile time, but blocks under the mask can s...

3 years ago | 0

Answered
Why does simulink generate warnings about quantization error when running my simulation?
Hi, I assume the coefficients have been entered using with MATLAB code like this coef = [0.05 0.15] Since MATLAB de...

3 years ago | 0

Answered
Hello. I have an issue related with the precission loss.
The code generation warning about using emulated types is not directly related to the primary question about parameter precision...

3 years ago | 1

Answered
Hello. I have an issue related with the precission loss.
I realized this is an old question, but I see there are multiple recent views, so providing a very late answer :-( is still li...

3 years ago | 0

Answered
Sil - mil compare for simulink model
Hi Giuseppe, Allowing the idealized floating point behavior to be compared with fixed-point behavior is a key feature of Fixe...

6 years ago | 2

| accepted