Create a 2-by-3 array of ones with specified
numerictype and `fimath`

properties.

Create a signed `fi`

object with word
length of `24`

and fraction length of `12`

.

Create a 2-by-3- array of ones that has the same numerictype
properties as `p`

.

X =
1 1 1
1 1 1
DataTypeMode: Fixed-point: binary point scaling
Signedness: Signed
WordLength: 24
FractionLength: 12

Define a 3-by-2 array `A`

.

Create a signed `fi`

object with word
length of `24`

and fraction length of `12`

.

Create an array of ones that is the same size as `A`

and
has the same numerictype properties as `p`

.

X =
1 1
1 1
1 1
DataTypeMode: Fixed-point: binary point scaling
Signedness: Signed
WordLength: 24
FractionLength: 12

Create a 4-by-4 array of ones with specified
numerictype and `fimath`

properties.

Create a signed `fi`

object with word
length of `24`

and fraction length of `12`

.

Create a 4-by-4 array of ones that has the same numerictype
properties as `p`

.

X =
1 1 1 1
1 1 1 1
1 1 1 1
1 1 1 1
DataTypeMode: Fixed-point: binary point scaling
Signedness: Signed
WordLength: 24
FractionLength: 12

Create a signed `fi`

object with word
length of 16, fraction length of 15 and `OverflowAction`

set
to `Wrap`

.

Create a 2-by-2 array of ones with the same `numerictype`

properties
as `p`

.

X =
0.999969482421875 0.999969482421875
0.999969482421875 0.999969482421875
DataTypeMode: Fixed-point: binary point scaling
Signedness: Signed
WordLength: 16
FractionLength: 15
RoundingMethod: Nearest
OverflowAction: Wrap
ProductMode: FullPrecision
SumMode: FullPrecision

1 cannot be represented by the data type of `p`

,
so the value saturates. The output `fi`

object `X`

has
the same `numerictype`

and `fimath`

properties
as `p`

.

Create a scalar fixed-point `1`

that
is not real valued, but instead is complex like an existing array.

Define a complex `fi`

object.

Create a scalar `1`

that is complex like `p`

.

X =
1.0000 + 0.0000i
DataTypeMode: Fixed-point: binary point scaling
Signedness: Signed
WordLength: 24
FractionLength: 12

Write a MATLAB^{®} algorithm that you can
run with different data types without changing the algorithm itself.
To reuse the algorithm, define the data types separately from the
algorithm.

This approach allows you to define a baseline by running the
algorithm with floating-point data types. You can then test the algorithm
with different fixed-point data types and compare the fixed-point
behavior to the baseline without making any modifications to the original MATLAB code.

Write a MATLAB function, `my_filter`

,
that takes an input parameter, `T`

, which is a structure
that defines the data types of the coefficients and the input and
output data.

Write a MATLAB function, `zeros_ones_cast_example`

,
that calls `my_filter`

with a floating-point step
input and a fixed-point step input, and then compares the results.