フィルターのクリア

How to configure byte unpack?

2 ビュー (過去 30 日間)
ander
ander 2014 年 11 月 5 日
回答済み: Dimitri MANKOV 2022 年 7 月 7 日
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

タグ

製品

Community Treasure Hunt

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

Start Hunting!

Translated by