File Exchange

image thumbnail

Floating number conversion to binary and vice-versa

version 1.3 (3.76 KB) by

Converts a fractional value to binary and vice versa

4.85714
7 Ratings

33 Downloads

Updated

View License

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).

Comments and Ratings (11)

Hello. Where can i see the code. Thank you

Gordon Amoako

Gordon Amoako (view profile)

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

the cyclist

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

rana ahmed

please make me watch the file

Nikolai

nabil

nabil (view profile)

tarun gupta

johnson chen

Pradoyt Biswas

Julius Baniaga

Updates

1.3

f_d2b has been made shorter

1.2

f_b2d.m has been made simpler.

1.1

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

MATLAB Release
MATLAB 7.8 (R2009a)

Download apps, toolboxes, and other File Exchange content using Add-On Explorer in MATLAB.

» Watch video