'Decimation' Error in Simulink
14 ビュー (過去 30 日間)
古いコメントを表示
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
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
採用された回答
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
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')
その他の回答 (0 件)
参考
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!