How to create a sine function from simulink blocks?
显示 更早的评论
Note: It is not allowed to use sine wave block or similar
I am trying to create a simulink model to reproduce a sine wave Amplitude*sin(2*pi*f*t + angle).
The output must be a sine signal that will be used elsewhere in a simulink model. My attempt doesn't work, I don't know why.

Result:

1 个评论
Sebastian
2025-5-9
Hi, you have to use the "Digital Clock" instead of the "Clock". Then you must set the "Sample time" of your "Digital Clock" to a very low value (in my case its 200e-6 seconds). After that, go the "Model Configuration Parameters" and set the "Solver" to "discrete (no continous state) and the "Type" to "Variable-step". After that you get your sine wave with your amplitude and frequency.
采纳的回答
更多回答(0 个)
类别
在 帮助中心 和 File Exchange 中查找有关 General Applications 的更多信息
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!