People, I am developing a C-MEX file (S-function) for implementing fixed point filters and testing the same using Simulink. I have 16 bit signed data in 1.15 format. I wanted to know what data format I should use (sfrac(16)/sfix(16)). Also how does one account for scaling and overflow? If you use Simulink's filter blocks, this is taken care of internally and what I think it does is to increase the width of the data type. Now this is not what I want. So any guidelines on this? What would be best would be some sample code, so I can go ahead and tweak it to see how things work. Any inputs will be greatly appreciated. T.
Simulink: S functions
Started by ●May 2, 2005
Reply by ●May 6, 20052005-05-06