Does DEC2HEX or HEX2DEC work on negative numbers (twos complement)?

15 vues (au cours des 30 derniers jours)
I would like to use DEC2HEX and HEX2DEC on negative numbers but MATLAB only allows posiitve values.

Réponse acceptée

MathWorks Support Team
MathWorks Support Team le 25 Jan 2010
The ability to use these functions on negative numbers is not available in MATLAB.
To work around this issue, use the following attached files:
ndec2hex.m
nhex2dec.m

Plus de réponses (0)

Catégories

En savoir plus sur Data Type Conversion dans Help Center et File Exchange

Produits

Community Treasure Hunt

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

Start Hunting!

Translated by