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: sprintf ('%X', -10) == '-1.000000e+01'
Replies: 3   Last Post: May 6, 2013 10:01 AM

Advanced Search

Back to Topic List Back to Topic List Jump to Tree View Jump to Tree View   Messages: [ Previous | Next ]
Steven Lord

Posts: 17,944
Registered: 12/7/04
Re: sprintf ('%X', -10) == '-1.000000e+01'
Posted: May 6, 2013 9:56 AM
  Click to see the message monospaced in plain text Plain Text   Click to reply to this topic Reply



<kzelechowski@e3tech.local> wrote in message
news:5187af67$0$1256$65785112@news.neostrada.pl...
> Why? The on-line help says the result should be typeset in hexadecimal
> digits, that would be '-A', wouldn?t it?


It should ... if -10 were an unsigned integer. Note where the row in the
format specification table that lists the %X format is located, and what the
corresponding value type is.

http://www.mathworks.com/help/matlab/ref/sprintf.html#inputarg_formatSpec

--
Steve Lord
slord@mathworks.com
To contact Technical Support use the Contact Us link on
http://www.mathworks.com




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.