Decimal to Hexadecimal conversion in simulink/stateflow
이전 댓글 표시
Hi,
Is it possible to convert a decimal to hexadecimal without using dec2hex() command.I mean,using just simulink blocks or inside a stateflow chart?
답변 (2개)
Walter Roberson
2011년 11월 10일
1 개 추천
You can use arithmetic blocks with division and mod() and subtractions and the like. But you will have to decide exactly what data type you want your output to be, as I do not recall that characters are one of the supported signal types.
댓글 수: 2
Meenu
2011년 11월 10일
Kaustubha Govind
2011년 11월 10일
Meenu: If you execute "class(dec2hex(15))" at the MATLAB prompt you'll see that dec2hex produces the "char" type, which is not a valid Simulink datatype. Could you explain how you plan to use the hex value in Simulink?
Pranav
2011년 11월 10일
0 개 추천
type in command window: >> edit dec2hex.m
The function logic can be seen.. You can use the same logic to build simulink models.
카테고리
도움말 센터 및 File Exchange에서 Simulink에 대해 자세히 알아보기
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!