Pythons unpack_From in Matlab
Show older comments
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
Accepted Answer
More Answers (0)
Categories
Find more on Call Python from MATLAB 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!