MATLAB 도움말 센터
Convert hexadecimal character vector to binary coefficients
b = hex2poly(hex)
b = hex2poly(hex,ord)
b = hex2poly(hex) converts a hexadecimal character vector, hex, to a vector of binary coefficients, b.
b
hex
example
b = hex2poly(hex,ord) specifies the power order, ord, of the coefficients that comprise the output. If omitted, ord is 'descending'.
ord
'descending'
collapse all
Convert the hexadecimal polynomial '1AF' to a vector of binary coefficients. The coefficients represent the polynomial x8+x7+x5+x3+x2+x+1.
'1AF'
b = hex2poly('1AF')
b = 1×9 1 1 0 1 0 1 1 1 1
Convert hexadecimal '0x82608EDB' to a vector of binary coefficients. Specify that the binary coefficients are in ascending order.
'0x82608EDB'
b = hex2poly('0x82608EDB','ascending')
b = 1×32 1 1 0 1 1 0 1 1 0 1 1 1 0 0 0 1 0 0 0 0 0 1 1 0 0 1 0 0 0 0 0 1
The binary representation corresponds to a polynomial of x31+x25+x22+x21+x15+x11+x10+x9+x7+x6+x4+x3+x+1.
Hexadecimal number, specified as a character vector.
Example: 'FF'
'FF'
Example: '0x3FA'
'0x3FA'
Data Types: char
char
'ascending'
Power order of the vector of binary coefficients, specified as a character vector having a value of 'ascending' or 'descending'.
Binary coefficients representing a polynomial, returned as a row vector having length equal to p + 1, where p is the order of hexadecimal input.
Introduced in R2015b
oct2poly | dec2hex
oct2poly
dec2hex
You clicked a link that corresponds to this MATLAB command:
Run the command by entering it in the MATLAB Command Window. Web browsers do not support MATLAB commands.
웹사이트 선택
번역된 콘텐츠를 보고 지역별 이벤트와 혜택을 살펴보려면 웹사이트를 선택하십시오. 현재 계신 지역에 따라 다음 웹사이트를 권장합니다:
또한 다음 목록에서 웹사이트를 선택하실 수도 있습니다.
사이트 성능 최적화 방법
최고의 사이트 성능을 위해 중국 사이트(중국어 또는 영어)를 선택하십시오. 현재 계신 지역에서는 다른 국가의 MathWorks 사이트 방문이 최적화되지 않았습니다.
미주
유럽
아시아 태평양
지역별 지사에 문의