Pythons unpack_From in Matlab
Mostrar comentarios más antiguos
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
Respuesta aceptada
Más respuestas (0)
Categorías
Más información sobre Call Python from MATLAB en Centro de ayuda y File Exchange.
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!