Different size definition in Matlab and Simulink
조회 수: 3 (최근 30일)
이전 댓글 표시
I am trying to work with TCP/IP communication in Simulink using "Simulink Coder" and "Simulink Desktop Real-Time" and faced a confusing problem. The size of an expression in Matlab is [1, 1].
>> bytes = uint8([0, 1]);
>> byte = typecast(bytes, 'uint16');
>> size(typecast(bytes, 'uint16'))
ans =
1 1
>>
However, when the same exact expression is run in Simulink through the "Matlab Function" block, the result size is [8, 1], but it is needed to be [1, 1].
How could it be solved or explained?
댓글 수: 0
참고 항목
카테고리
Help Center 및 File Exchange에서 Target Computer Setup에 대해 자세히 알아보기
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!