Convert decimal to ASCII
50 Ansichten (letzte 30 Tage)
Ältere Kommentare anzeigen
Mihai Ganga
am 15 Jun. 2021
Bearbeitet: Mihai Ganga
am 16 Jun. 2021
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 Kommentare
Akzeptierte Antwort
Weitere Antworten (0)
Siehe auch
Kategorien
Mehr zu Characters and Strings finden Sie in Help Center und File Exchange
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!