필터 지우기
필터 지우기

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 CenterFile Exchange에서 Schedule Model Components에 대해 자세히 알아보기

제품


릴리스

R2018b

Community Treasure Hunt

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

Start Hunting!

Translated by