4.83333

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

Floating number conversion to binary and vice-versa

by

 

07 Feb 2007 (Updated )

Converts a fractional value to binary and vice versa

| Watch this File

File Information
Description

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

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

21 Apr 2014 the cyclist

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

10 Nov 2013 rana ahmed

please make me watch the file

23 Feb 2013 Nikolai  
28 Feb 2012 nabil  
19 Aug 2008 tarun gupta  
10 Dec 2007 johnson chen  
03 Oct 2007 Pradoyt Biswas  
24 Jun 2007 Julius Baniaga  
Updates
22 Feb 2012

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

23 Feb 2012

f_b2d.m has been made simpler.

16 Jul 2012

f_d2b has been made shorter

Contact us