I want to create a code that converts decimal to ieee754. I do not want to use dec2bin so I do not know where to start. I want x to be my decimal number, eb to number of exponent bits and mb for my mantissa. The outputs are the convert value 'q' followed by s, e, m for sign, exponent, mantissa.
function [q, s, e, m,] = GetRepresentationIEEE754(x, eb, mb)