![](https://www.mathworks.com/matlabcentral/answers/uploaded_files/779528/image.png)
Time dependent matrix entry
5 ビュー (過去 30 日間)
古いコメントを表示
Christo van Rensburg
2021 年 10 月 26 日
コメント済み: Christo van Rensburg
2021 年 10 月 28 日
Good day,
I've got a repeating sequence block with a 1x2-matrix for the durations of the output values. I however need to change these values, each entry, according to a ramp function that implements a linear increase. Below is a setup of the model I currently have in Simulink.
Any idea on how I can achieve this?
![](https://www.mathworks.com/matlabcentral/answers/uploaded_files/779293/image.png)
0 件のコメント
採用された回答
Jon
2021 年 10 月 26 日
編集済み: Jon
2021 年 10 月 26 日
Under source blocks in the Simulink library there is a block called Ramp. It seems like this should work for your purpose.
![](https://www.mathworks.com/matlabcentral/answers/uploaded_files/779528/image.png)
6 件のコメント
Jon
2021 年 10 月 27 日
編集済み: Jon
2021 年 10 月 27 日
I now see you want the square wave to go from say 0 to 5 rather than -1 to 1. You can just add 1 to the output of the sign block (using a sum block and constant) and then scale it with a gain block.
If you need the on and off (low and high values) duration to be different, you can offset the chirp signal (add a constant) before you apply the sign function.
その他の回答 (0 件)
参考
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!