Decimal to Hexadecimal conversion in simulink/stateflow
3 ビュー (過去 30 日間)
古いコメントを表示
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?
0 件のコメント
回答 (2 件)
Walter Roberson
2011 年 11 月 10 日
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 件のコメント
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 日
type in command window: >> edit dec2hex.m
The function logic can be seen.. You can use the same logic to build simulink models.
0 件のコメント
参考
カテゴリ
Help Center および File Exchange で Signal Operations についてさらに検索
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!