sdec2hex.m

Convert signed decimal integer to hexadecimal string.
198 Downloads
Updated 19 Jun 2014

View License

%SDEC2HEX Convert signed decimal integer to hexadecimal string.
% SDEC2HEX(D) returns a 2-D string array where each row is the
% hexadecimal representation of each decimal integer in D.
% D must contain signed integers smaller than 2^52.
%
% SDEC2HEX(D,N) produces a 2-D string array where each
% row contains an N digit hexadecimal number.
%
% Example
% sdec2hex(-2748) returns 'F544'.
%
% See also DEC2HEX, HEX2DEC, HEX2NUM, DEC2BIN, DEC2BASE.
% Modified from the DEC2HEX by MathWorks, Inc.

Cite As

Petri Väisänen (2026). sdec2hex.m (https://www.mathworks.com/matlabcentral/fileexchange/47001-sdec2hex-m), MATLAB Central File Exchange. Retrieved .

MATLAB Release Compatibility
Created with R2013a
Compatible with any release
Platform Compatibility
Windows macOS Linux
Categories
Find more on Data Type Conversion in Help Center and MATLAB Answers
Version Published Release Notes
1.0.0.0