MATLAB: How to do the same job that the simulink block “Byte Unpack” but in matlab not with simulink

udp receiveunpack data

Hi everyone,
I'm looking for functions in matlab or different ways to create a function which can do the same job that the simulink block "Byte Unpack".
I'm trying to unpack the input data message(uint8) to the unpacked output message (single) with 6 output ports dimension (See picture). But in my case I don't want to use simulink, only matlab code. The input data message come from to :
Receiver = dsp.UDPReceiver('LocalIPPort',8080,'RemoteIPAddress','192.168.102.111',...
'ReceiveBufferSize',24,'MaximumMessageLength',24,'MessageDataType','uint8');
DATAReceived = step(Receiver);
Any ideas? or suggestions?
Thanks,
Alexis

Best Answer

I think some combination of typecast and swapbytes will get you close to what you want.