Convert byte to double
조회 수: 18 (최근 30일)
이전 댓글 표시
Hi, I have somae data in a byte format that i want to convert to double format. Does anyone know how to do this in matlab?
I have read the data in to a char, where every 8 characters should represent a double.
My data looks like this :
QAAAAAAAaIBAAAAAAADQgUAAAAAAAHCCQAAAAAAAsINAAAAAAAAohEAAAAAAAKCEQAAAAAAA4IVAAAAAAABgiEAAAAAAAJCKQAAAAAAAMItAAAAAAADQi0AAAAAAAGCNQAAAAAAAUI5A
/Malte
댓글 수: 1
David Young
2012년 1월 9일
Do you have any more information about how the numbers are coded? It's odd that there are only letters displayed, and there seem to be more than 8 characters per value judging from the periodicity. Showing the value of double(data), where data is your character string, might help.
채택된 답변
추가 답변 (1개)
Jan
2012년 1월 9일
Is there a good reason not to read the data in double format directly?
Usually typecast performs a binary conversion.
댓글 수: 1
Geoffrey
2025년 4월 9일
The "typecast" function is useful for things like converting a string of bytes (stored as a uint8 vector for example) into other data types.
참고 항목
카테고리
Help Center 및 File Exchange에서 Data Type Conversion에 대해 자세히 알아보기
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!