Change the output data type

2 vues (au cours des 30 derniers jours)
Ho
Ho le 8 Août 2023
Commenté : Kiran Kintali le 9 Août 2023
I have a simulink model as follows
As you can see the data output is in the form fixed fixdt(1,14,12). Can anyone help me convert the output to fixdt(1,14,13)? what block do i have to use to do that? This is my model
  2 commentaires
Kiran Kintali
Kiran Kintali le 8 Août 2023
Please consider using fixed point designer to analyze ranges and use better fixed point types in the blocks.
Kiran Kintali
Kiran Kintali le 9 Août 2023
Found few incorrect constant types. For example you had a constant block where '1' cannot be represented with the output type set on the block.
>> a = fi(0, 0,14,14)
a =
0
DataTypeMode: Fixed-point: binary point scaling
Signedness: Unsigned
WordLength: 14
FractionLength: 14
>> a.range
ans =
0 0.999938964843750
DataTypeMode: Fixed-point: binary point scaling
Signedness: Unsigned
WordLength: 14
FractionLength: 14
>>
Attached model with the necessary changes.

Connectez-vous pour commenter.

Réponses (0)

Catégories

En savoir plus sur HDL Code Generation dans Help Center et File Exchange

Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!

Translated by