Is there a Matlab function that returns the binary representation of a float number?
Is there a Matlab function that returns the binary representation of a float number?
Share
Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.
Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.
Lost your password? Please enter your email address. You will receive a link and will create a new password via email.
Please briefly explain why you feel this question should be reported.
Please briefly explain why you feel this answer should be reported.
Please briefly explain why you feel this user should be reported.
In Matlab, one can use Java JDK functions.
The short answer for converting float (single precision 32-bit number) in Matlab to a binary string representation might be:
The long answer: conversion of float (single precision 32-bit number) in Matlab to a binary string representation
And a conversion of binary string to float with a little overhead: