How to add a sine wave with a frequency of 50hz and a magnitude of 20 in Simulink

13 views (last 30 days)
How to input magnitude value in sine wave block

Accepted Answer

Sam Chak
Sam Chak on 28 Jul 2022
Enter the values for the Amplitude and Frequency in the Sine Wave block. In MATLAB, it looks like this:
t = 0:0.0001:0.1;
freq = 50; % Frequency
amp = 20; % Amplitude
x = amp*sin(2*pi*freq*t);
plot(t, x), grid on, ylim([-40 40]), xlabel('t')
  6 Comments
Sam Chak
Sam Chak on 28 Jul 2022
You are welcome, @Pranav. I'm glad it works. If you find the brief solution is helpful, please consider accepting ✔ and voting 👍 the Answer. Thanks!

Sign in to comment.

More Answers (1)

Pranav
Pranav on 28 Jul 2022

Tags

Products


Release

R2016b

Community Treasure Hunt

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

Start Hunting!