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: ssGetOutputPortDataType
Replies: 1   Last Post: Jul 11, 2013 8:42 AM

Advanced Search

Back to Topic List Back to Topic List Jump to Tree View Jump to Tree View   Messages: [ Previous | Next ]
Steve Conahan

Posts: 3
Registered: 7/11/13
Re: ssGetOutputPortDataType
Posted: Jul 11, 2013 8:42 AM
  Click to see the message monospaced in plain text Plain Text   Click to reply to this topic Reply

Hi, After you have the data type ID (the return value from
ssGetOutputPortDataType), then you can use code similar to that from this
Fixed-Point S-Function Example to get fixed-point (sign, word length,
scaling) information from it:

http://www.mathworks.com/help/fixedpoint/ug/fixed-point-s-function-examples.html#f7973

In particular, the following API functions may be helpful to you:

ssGetDataTypeFxpIsSigned
ssGetDataTypeFxpWordLength
ssGetDataTypeFracSlope
ssGetDataTypeFixedExponent
ssGetDataTypeTotalSlope
ssGetDataTypeBias

These terms are further explained here:

http://www.mathworks.com/help/fixedpoint/data-types-and-scaling.html

Best regards, Steve


"Prabhakaran thirugnanam" <tpkaran1985@yahoo.com> wrote in message
news:krh07i$i0d$1@newscl01ah.mathworks.com...
> The S-function API, ssGetOutputPortDataType() function returns the data
> type ID as below
> 0 SS_DOUBLE
> 1 SS_SINGLE
> 2 SS_INT8
> 3 SS_UINT8
> 4 SS_INT16
> 5 SS_UINT16
> 6 SS_INT32
> 7 SS_UINT32
> 8 SS_BOOLEAN
>
> But If the datatype is scaled(i.e fixdt()...) It returns 15 for all scaled
> datatypes(fixdt(1,16,0), fixdt(1,8,0)......). How can I obtain the exact
> datype of my outport?
>




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.