'Decimation' Error in Simulink

조회 수: 17 (최근 30일)
di liu
di liu 2020년 10월 12일
댓글: di liu 2020년 10월 15일
Hi all,
I hope you are well. When I run my Simulink model, I met the issue 'The 'Decimation' option must be a positive integer'. Does anyone know why it occurs?
Thank you for your help.
Di
  댓글 수: 2
Mathieu NOE
Mathieu NOE 2020년 10월 12일
well, you can resample with non integer values in matlab, but that is not doable in causal systems.
In simulink, decimation must always be performed with an integer decimation factor
look at the help
di liu
di liu 2020년 10월 15일
Hi Mathieu,
Thank you for your answer. The main issue is in Simulink, it does not tell me which block causes the error.

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

채택된 답변

Fangjun Jiang
Fangjun Jiang 2020년 10월 12일
Follow the link of the error message to find the involved block. You must have provied an incorrect number for the "Decimation" parameter, which is a factor, n, which writes data at every nth time that the block executes. It's value must be a positive integer.
  댓글 수: 3
Fangjun Jiang
Fangjun Jiang 2020년 10월 15일
편집: Fangjun Jiang 2020년 10월 15일
It is weird it didn't tell the violating block.
Best way is to attach the model. If not, run the following code. 'f14' is a built-in example model. Observe the value and hopefully find the problematic block.
%%
f14;
blocks=find_system('f14','FollowLinks','On','LookUnderMasks','All','RegExp','On','Decimation','\w')
decimation=get_param(blocks,'Decimation')
di liu
di liu 2020년 10월 15일
Hi Fangjun,
Thank you for your help. I have found the issue, it is caused by the 'clock' block.

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

추가 답변 (0개)

카테고리

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

제품


릴리스

R2019b

Community Treasure Hunt

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

Start Hunting!

Translated by