![](https://www.mathworks.com/matlabcentral/answers/uploaded_files/1342304/image.png)
creating sine wave with variable frequency
84 views (last 30 days)
Show older comments
requesta depache
on 19 Apr 2019
Answered: Idin Motedayen-Aval
on 23 May 2024
I used this configuration to create sine wave with variable frequency , i tried changing gain , simulation time , scope's sampling time but ofcourse they all changed wave form but with same frequency
![](https://www.mathworks.com/matlabcentral/answers/uploaded_files/214928/image.png)
![](https://www.mathworks.com/matlabcentral/answers/uploaded_files/214929/image.png)
1 Comment
Rawnak Rahman
on 1 Apr 2023
How can i take this modified sine wave as an input into the physical circuit. Ps-simulink converter doesn't work![](https://www.mathworks.com/matlabcentral/answers/uploaded_files/1342304/image.png)
![](https://www.mathworks.com/matlabcentral/answers/uploaded_files/1342304/image.png)
Accepted Answer
Jim Riggs
on 19 Apr 2019
Edited: Jim Riggs
on 19 Apr 2019
The reason that the frequency is constant is that you are driving it with a linear function of time. If you plot the input signal (2*pi*t) you will see that it is a linear ramp. The sine of this is a constant frequency. In order to get a change in frequency, you need to use a highrt power of time. Add an exponent block to the time signal and use an exponent greater than 1. (Use the "Math Function" block, and select "pow" as the function.) (you will also probably want to reduce the gain from 2*pi to somthing much smaller. Try 0.2 to start with)
![](https://www.mathworks.com/matlabcentral/answers/uploaded_files/214958/image.jpeg)
More Answers (1)
Idin Motedayen-Aval
on 23 May 2024
You can take a more direct/trivial approach to generate sin(2*pi*f*t) with a variable f (model attached).
![](https://www.mathworks.com/matlabcentral/answers/uploaded_files/1702471/image.png)
The follow-up question about how to attach this to a physical circuit:
0 Comments
See Also
Categories
Find more on Circuits and Systems in Help Center and File Exchange
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!