フィルターのクリア

Data transfert between 2 subsystems with a different endianess.

2 ビュー (過去 30 日間)
christian VALPARD
christian VALPARD 2021 年 9 月 7 日
回答済み: Animesh 2024 年 4 月 16 日
Hi,
Is it possible to have a model including only :
. 2 Subsystems with different endianess ?
. Communication between the 2 subsystems ?
Best regards
C. VALPARD

回答 (1 件)

Animesh
Animesh 2024 年 4 月 16 日
Yes, it is feasible to incorporate two subsystems within Simulink, each employing a distinct endianness. To transition from one format to the other, you can leverage a MATLAB Function block, utilizing the swapbytes function for this purpose. Below is a sample function to assist in swapping the byte order:
function y = swapBytes(x)
% Interpret x as a uint32, then swap the bytes
x = typecast(x, 'uint32');
y = swapbytes(x);
end
I hope this helps.
Regards,
Animesh

カテゴリ

Help Center および File ExchangeSchedule Model Components についてさらに検索

製品


リリース

R2018b

Community Treasure Hunt

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

Start Hunting!

Translated by