Question: C . Use MATLAB or Octave to generate two sinusoidal functions of time. You can use the below template; change the frequencies so that one

C. Use MATLAB or Octave to generate two sinusoidal functions of time. You can use the below template; change the frequencies so that one is a decimal using the last two digits of your student ID and the other a decimal that \({}_{v}\) uses the first two digits. Include your script/ code and a screenshot of the resulting plot showing at least two periods of both original funcuoris.
```
# set up the times
time =[0:0.001:5];
# get the two sinusoids
v1=5*sin(2*pi*0.38*time);
v2=6*sin(2*pi*0.63*time);
# plot the two sine functions and their difference
f1= figure;
plot(time,v1,'b')
hold on, grid on
plot(time, v2,'r')
plot(time,v1-v2,'g','LineWidth',3)
xlabel('Time (s)'), ylabel('Voltage (V)')
legend('v1','v2','v1-v2')
title('yournamehere: Voltage v. time, input and output: difference
amplifier')
```
C . Use MATLAB or Octave to generate two

Step by Step Solution

There are 3 Steps involved in it

1 Expert Approved Answer
Step: 1 Unlock blur-text-image
Question Has Been Solved by an Expert!

Get step-by-step solutions from verified subject matter experts

Step: 2 Unlock
Step: 3 Unlock

Students Have Also Explored These Related Electrical Engineering Questions!