How to configure byte unpack?

1 次查看(过去 30 天)
ander
ander 2014-11-5
Hi, I have a client-server aplication and I am sending udp packets to the server. The server takes this packets and return it to matlab. When I send packets the total size is 16 bytes (2 doubles) so I am sure that the size of returning packet is 16 byte. Then I have to unpack and for that I have the next configuration:
I think I am doing well but simulink has another opinion. The error it gives is the next:
Thanks

回答(1 个)

Dimitri MANKOV
Dimitri MANKOV 2022-7-7
Hi Ander,
I'm not sure whether the Byte Unpack block is capable of outputting matrix signals... But most importantly, the dimensions don't seem to match what you're trying to achieve: if you know that you get a vector of 16 bytes as an input and want to have 2x double signals as the output, you should use the following parameters:
  • Output data type: {'double', 'double'}
  • Output dimension: {[1],[1]}
... if you want two output ports, or:
  • Output data type: {'double'}
  • Output dimension: {[2]}
... if you'd prefer one output port with a vector signal.
I hope this is helpful!
Dimitri

类别

Help CenterFile Exchange 中查找有关 Development Computer Setup 的更多信息

标签

产品

Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!

Translated by