4.8 | 6 ratings Rate this file 49 Downloads (last 30 days) File Size: 3.76 KB File ID: #13899 Version: 1.3

Floating number conversion to binary and vice-versa


Gordon Amoako (view profile)


07 Feb 2007 (Updated )

Converts a fractional value to binary and vice versa

| Watch this File

File Information

This M-File extends MATLAB's inbuilt dec2bin() and bin2dec() functions functionalities. When you enter a floating point number as 25.757 you expect to get the correspoing binary number and vice versa.Feel free to make corrections. But make reference to me where needed(laugh).

MATLAB release MATLAB 7.8 (R2009a)
Tags for This File   Please login to tag files.
Please login to add a comment or rating.
Comments and Ratings (9)
21 Oct 2014 Gordon Amoako

Gordon Amoako (view profile)

Sorry @the cyclist, you supposed to call the f_d2b function.

Comment only
21 Apr 2014 the cyclist

I'm confused. The output of d2b(5.9) is 101.9.

Comment only
10 Nov 2013 rana ahmed

please make me watch the file

Comment only
23 Feb 2013 Nikolai  
28 Feb 2012 nabil

nabil (view profile)

19 Aug 2008 tarun gupta  
10 Dec 2007 johnson chen  
03 Oct 2007 Pradoyt Biswas  
24 Jun 2007 Julius Baniaga  
22 Feb 2012 1.1

I have made the f_b2d rather shorter. Taken the for loops and used the 'find' function effectively.

23 Feb 2012 1.2

f_b2d.m has been made simpler.

16 Jul 2012 1.3

f_d2b has been made shorter

Contact us