How to set a sample time in a Discrete Transfer Fcn??
193 ビュー (過去 30 日間)
古いコメントを表示
I'm following the training of Simulink fundamentals, and I'm stucked trying to set the sample time on the parameters. Is not showing me that option to set it. I attached an image for you to view. Please I need some help with this is the only task that is left to end the course. Thanks in advance.![](https://www.mathworks.com/matlabcentral/answers/uploaded_files/1495869/image.png)
![](https://www.mathworks.com/matlabcentral/answers/uploaded_files/1495869/image.png)
4 件のコメント
Henrique
2023 年 10 月 6 日
Yes, I had the same problem.
Matlab gives some explanation at "https://nl.mathworks.com/help/simulink/ug/sampletimehiding.html".
The workaround by promoting the parameter worked for me. You can read more about promoting the parameter at "https://nl.mathworks.com/help/simulink/ug/parameter-promotion.html"
採用された回答
Oren Savir
2023 年 10 月 29 日
I also got stuck with this problem.
but here is the solution:
Click the block (discrete transfer function)
Go to Model Explorer
change to default from the dropdown menu
Add SampleTime to objects visible:
Then click at bottom on paremter value and change -1 to Ts.
Exit Model Explorer
Clicking the block now includes the Sample Time option.
5 件のコメント
Paula
2024 年 8 月 7 日 12:48
Agree with Zhaolun's approach, esier, open model data editor can edit all sample times for all the blocks. ![](https://www.mathworks.com/matlabcentral/answers/uploaded_files/1748574/image.png)
![](https://www.mathworks.com/matlabcentral/answers/uploaded_files/1748574/image.png)
その他の回答 (4 件)
Subhrajeet
2024 年 2 月 28 日
Step1 : Go to Model Explorer and change the Column view to Default.
Step2: Search SampleTime under the search section and double click on the SampleTime, and then the SampleTime will come under "Display column names" section.
Step3: Then see the buttom of the page, The columns will appear [Name, BlockType, SampleTime].
Step4: Then double click on Discrete Filter -> Sample Time to what ever you want.
(See the attached pdf for the Complete Solution)
0 件のコメント
Michael
2023 年 10 月 3 日
Per default the sample time of this block is (-1). This means the sample time is inherited from the signal at the input of the block. It is documented at the end of the help page of "Discrete Transfer Fcn" in the chapter "Version History"
0 件のコメント
Hassaan
2024 年 2 月 9 日
編集済み: Hassaan
2024 年 2 月 9 日
@MathWorks Support Team I am having the same issue and stuck on this part. None of the solutions worked for me.
Simulink fundamentals
Modeling Discrete Dynamic Systems
Modeling Discrete Transfer Functions and State-Space Representations
Task 2
1 件のコメント
Paula
2024 年 8 月 7 日 12:52
![](https://www.mathworks.com/matlabcentral/answers/uploaded_files/1748579/image.png)
sorry to hear this, please open Model Data Editor Under 'Modeling' Tab. you will see the window above. on the far right, there is a column of sample time. you can edit all sample times for all the blocks here. once you put in Ts_filt for block 'Discrete Filter', then go back to the block again, you will see the updated Sample Time shows up. and click on the 'why' which explains in detail why by default , this sample time was hiddlen. Hope this helps. ![](https://www.mathworks.com/matlabcentral/answers/uploaded_files/1748584/image.png)
![](https://www.mathworks.com/matlabcentral/answers/uploaded_files/1748584/image.png)
Kitsirin
2024 年 7 月 31 日 4:21
Does the following block have the correct parameter settings?
Discrete Filter:
Numerator: num_filt
Denominator: den_filt
InitialStates: 0
SampleTime: Ts_filt
1 件のコメント
参考
カテゴリ
Help Center および File Exchange で Interactive Model Editing についてさらに検索
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!