Get binary value of any file

조회 수: 6 (최근 30일)
Nelson Rodriguez Hernandez
Nelson Rodriguez Hernandez 2016년 7월 5일
댓글: Image Analyst 2016년 7월 5일
Suppose I have a file such as music.mp3 or image.jpg or any file to be considered. How do i get the binary representation of those files to a string value in matlab or octave so that i can view it ?? and how to parse the string and write back to a file???
Eg: Suppose I have file called 'video.mp4' then it must be represented as 101011010101000111010 or something like that in memory i need to get the value and store it in String like String s = "101011010101000111010", "101011010101000111010" to 'video.mp4'
Does anyone have any idea on how to do this in matlab or octave ?????

답변 (1개)

Image Analyst
Image Analyst 2016년 7월 5일
Try getting the numbers then use dec2bin() to convert the numerical number into a binary string.
  댓글 수: 2
Nelson Rodriguez Hernandez
Nelson Rodriguez Hernandez 2016년 7월 5일
I have to het the numbers in a array or vector?
Image Analyst
Image Analyst 2016년 7월 5일
I don't know what "het" means, but the values will be in a character array (row vector):
>> str = dec2bin(14)
str =
1110

댓글을 달려면 로그인하십시오.

카테고리

Help CenterFile Exchange에서 Octave에 대해 자세히 알아보기

Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!

Translated by