No BSD License  

Highlights from
BIN2HEX

5.0

5.0 | 2 ratings Rate this file 30 Downloads (last 30 days) File Size: 1.49 KB File ID: #1975

BIN2HEX

by Richard Medlock

 

17 Jul 2002 (Updated 19 Jul 2002)

Converts Binary strings to HEX

| Watch this File

File Information
Description

Converts binary strings of any length to hexadecimal pairs. Adds leading zeros if there is not an even number of hex bits.

The zip file contains the 'isodd' function which is required, and the 'FormatHexStr' function to put spaces or convert to a cell array.

Example:

bin2hex('11101001')

ans =

E9

bin2hex('11011101111110111')

ans =

01BBF7

MATLAB release MATLAB 6.1 (R12.1)
Tags for This File  
Everyone's Tags
Tags I've Applied
Add New Tags Please login to tag files.
Comments and Ratings (2)
16 Sep 2003 VALDENIR DUARTE  
18 Dec 2007 Brian Farmer

This works great, and I used it with dec2bin first.

Please login to add a comment or rating.
Tag Activity for this File
Tag Applied By Date/Time
strings Richard Medlock 22 Oct 2008 06:46:35
bin Richard Medlock 22 Oct 2008 06:46:35
binary Richard Medlock 22 Oct 2008 06:46:35
hex Richard Medlock 22 Oct 2008 06:46:35
convert Richard Medlock 22 Oct 2008 06:46:35
conversion Richard Medlock 22 Oct 2008 06:46:35
hexadecimal Richard Medlock 22 Oct 2008 06:46:35
hex miguel 01 Nov 2010 15:03:24

Contact us at files@mathworks.com