Why I am not getting sample time in discrete filter block?

25 Ansichten (letzte 30 Tage)
Ramprakash
Ramprakash am 13 Jun. 2024
Kommentiert: Ramprakash am 14 Jun. 2024

Akzeptierte Antwort

Shivani
Shivani am 13 Jun. 2024
Bearbeitet: Shivani am 13 Jun. 2024
MathWorks does not recommend setting Sample Time for some of its blocks, and the Discrete Filter Function block is among these. As stated in the official documentation:
"Sample time parameter is not available on certain blocks because specifying a sample time that is not -1 on blocks such as the Gain, Sum, n-D Lookup Table, Discrete Filter, Discrete FIR Filter, and Discrete Transfer Fcn causes sample rate transition to be implicitly mixed with block algorithms. This mixing can often lead to ambiguity and confusion in Simulink® models."
You can read more about this in the following MATLAB documentation link: https://www.mathworks.com/help/simulink/ug/sampletimehiding.html
However, you can set the Sample Time for the Discrete Filter Function programmatically. To do so, select the Discrete Filter Function block in your model and run the following command in your MATLAB command prompt:
set_param(gcb,'SampleTime','-1')

Weitere Antworten (0)

Kategorien

Mehr zu Modeling finden Sie in Help Center und File Exchange

Community Treasure Hunt

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

Start Hunting!

Translated by