how to generate full wave rectified sine wave?

how to generate full wave rectified sine wave of frequency 2KHz, amplitude +/- 0.2 and duration of 1 millisecond ?

 Accepted Answer

Hello Thar, attach an Abs (for absolute) block from the Math Operations library to the Sine Wave generator (Sources). In the Sine Wave block you can define the signal parameters (frequency, amplitude). 1 ms would be the simulation stop time.
Similarly, in MATLAB,
t = 0:1e-5:1e-3;
y = abs(0.2 * sin(2*pi*2e3*t));
plot(t,y)

More Answers (3)

Categories

Community Treasure Hunt

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

Start Hunting!