Convert decimal to ASCII
50 views (last 30 days)
Show older comments
Hello everyone,
I'm trying to convert some small decimal numbers (e.g. 0.250, 2.500) to ASCII values so I can send them to some power supply via serial. When using a simple MATLAB script it worked pretty well using "sprintf" (e.g. uint8(sprintf('SO:VO %.4f\n', voltage));) but when trying to use Simulink Realtime I am not able to use sprintf anymore.
I would like to write a small function to do this but don't know where to start.
Any advice is much appreciated!
0 Comments
Accepted Answer
More Answers (0)
See Also
Categories
Find more on Characters and Strings in Help Center and File Exchange
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!