shex2dec.m
Version 1.0.0.0 (1.26 KB) by
Petri Väisänen
Convert signed hexadecimal string to decimal integer.
%SHEX2DEC Convert signed hexadecimal string to decimal integer.
% D = SHEX2DEC(H) interprets the hexadecimal string H and returns in D the
% equivalent decimal number.
%
% If H is a character array or cell array of strings, each row is interpreted
% as a hexadecimal string.
%
% EXAMPLES:
% shex2dec('FFFFFF2B') and shex2dec('f2b') both return -213
%
% See also HEX2DEC, DEC2HEX, HEX2NUM, BIN2DEC, BASE2DEC.
% Modified from the HEX2DEC by MathWorks, Inc.
Cite As
Petri Väisänen (2026). shex2dec.m (https://www.mathworks.com/matlabcentral/fileexchange/47002-shex2dec-m), MATLAB Central File Exchange. Retrieved .
MATLAB Release Compatibility
Created with
R2013a
Compatible with any release
Platform Compatibility
Windows macOS LinuxCategories
Find more on Data Type Conversion in Help Center and MATLAB Answers
Tags
Discover Live Editor
Create scripts with code, output, and formatted text in a single executable document.
| Version | Published | Release Notes | |
|---|---|---|---|
| 1.0.0.0 |
