Write a MATLAB program to represent sine waves with frequencies of 2 Hz and 10 Hz using a sampling frequency of 40 Hz. Show your results with 100 samples in both the continuous and discrete domains, as shown in the picture.
Fill out the blanks in the code below:
N = % Total number of time domain samples in simulation.
A1 = % Amplitude of wave-1.
A2 = % Amplitude of wave-2.
Fs = % Sampling frequency.
F1 = % Frequency of wave-1.
F2 = % Frequency of wave-2.
phie = % Zero phase signal.
t = % Time samples.
y1 = % First sine wave.
y2 = % Second sine wave.
What are the digital frequencies (rad/sec) associated with both waves?
How many samples per period of both waves?
0.8
0.8
0.6
0.6
0.4
0.4
0.2
0.2
Amplitude
0
-0.2
-0.2
-0.4
0.4
90
0.6
-0.8
g0
-1
0
0.5
1.5
Time in sec
2
2.5
0.5
1.5
Time in sec
2
2.5
0.8
0.8
0.6
0.6
0.4
0.4
0.2
0.2
Amplitude
0
0.2
-0.2
-0.4
-0.4
-0.6
0.6
0.8
-1
0
0.5
1.5
Time in sec
2
2.5
0.5
1.5
Time in sec
2
2.5