How can I get the data size/length from a signal in Simulink?

조회 수: 2 (최근 30일)
Tim Leschinsky
Tim Leschinsky 2018년 7월 17일
댓글: Tim Leschinsky 2018년 7월 18일
I'm currently trying to get the size/length of data from a signal in Simulink. I've already tried the Probe Block, but this only gave me the width of the signal. I'm trying to determine whether I've got 'single' or 'double' data on the signal. This should give me either 4 or 8 as the size/length based on the number of bytes.

답변 (1개)

Dimitris Kalogiros
Dimitris Kalogiros 2018년 7월 18일
Hi Tim
Try Display -> Sihnals & Ports -> Port Data Types
This forces simulink to show up the data type of block's ports
  댓글 수: 1
Tim Leschinsky
Tim Leschinsky 2018년 7월 18일
Thanks for your answer, but I want to have the type itself as a signal. This way I can let this signal then go into, let's say a Switch-Case block, and this block then uses it during runtime. I want to have it dynamically because the data type can change and I want my model to adapt/react to that change.

댓글을 달려면 로그인하십시오.

카테고리

Help CenterFile Exchange에서 Sources에 대해 자세히 알아보기

제품


릴리스

R2018a

Community Treasure Hunt

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

Start Hunting!

Translated by