Plotting sine wave for voltage with variation of frequency

3 views (last 30 days)
Hello there,
Do anyone know to plot the sine wave with variable amplitude;
here V(amplitude)= 0 2 4 6 12 16 20 20 14 10
wth frequency(Hz)= 0 200 250 300....... 700 respectively
I am looking for wave likely appears on oscilloscope, which is attached below. Here the wave time is set for 1mS and voltage for 1mV

Accepted Answer

Star Strider
Star Strider on 9 Jun 2021
I am not certain what the desired result is.
If the frequencies and amplitudes are fixed with respect to time, try this —
t = linspace(0, 10, 1000);
s = sin([0;200;250;300]*2*pi*t) .* (0:2:6).';
figure
plot(t,s)
grid
Otherwise, this is a modulation problem, and requires a different approach.
  2 Comments
Avadhut Patil
Avadhut Patil on 13 Jun 2021
Thank you ! Yes, you are correct, I made a mistake inside Sine function.
For all frequencies i got the curve.
Thank you!

Sign in to comment.

More Answers (0)

Community Treasure Hunt

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

Start Hunting!