Pythons unpack_From in Matlab
Ältere Kommentare anzeigen
Greetings!
I am receiving some data over UDP in form of array of integers. For example y= [ 67 36 73 43] this is the data received. The actual sensor value is 161.0.
I am not able to convert this received data to 161.0.
However when I have used Python's script using unpack_fom I was able to decode to correct value of 161.0
Python code : >>> pack('!f',161) 'C!\x00\x00' >>> unpack_from('!f','C!\x00\x00') (161.0,)
Let me know if anyone has better solution to decode value [67 36 73 43] to 161.0 float value
Akzeptierte Antwort
Weitere Antworten (0)
Kategorien
Mehr zu Call Python from MATLAB finden Sie in Hilfe-Center und File Exchange
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!