Drexel dragonThe Math ForumDonate to the Math Forum



Search All of the Math Forum:

Views expressed in these public forums are not endorsed by Drexel University or The Math Forum.


Math Forum » Discussions » Software » comp.soft-sys.matlab

Topic: regarding fixdt
Replies: 1   Last Post: Jul 31, 2013 2:01 PM

Advanced Search

Back to Topic List Back to Topic List Jump to Tree View Jump to Tree View   Messages: [ Previous | Next ]
Prabhakaran thirugnanam

Posts: 35
Registered: 6/17/10
regarding fixdt
Posted: Jul 21, 2013 8:49 AM
  Click to see the message monospaced in plain text Plain Text   Click to reply to this topic Reply

When I mention the data type as fixdt(0,8,3) in a constant block, The total wordlength is 8bits, fractional length is 3 bits. So the remaing 5 bits allocated for integer part. So If I enter any value greater than 32, simulink throws overflow error. This is clear for simulation. However when I generate code for a particula simulink block with the datatype mentioned as fixdt(0,8,5) The corresponding signal is assigned with the datatype uint8 and no restriction on bitsize. It seems the signal with datatype fixdt(0,8,3) can hold the value 255 even. Making the datatype fixdt(0,8,3)/ uint8 has no difference in the genrated code.



Point your RSS reader here for a feed of the latest messages in this topic.

[Privacy Policy] [Terms of Use]

© Drexel University 1994-2014. All Rights Reserved.
The Math Forum is a research and educational enterprise of the Drexel University School of Education.