Question

In: Electrical Engineering

Generate and plot sinusoids of frequencies 300 Hz, 500 Hz and 1200 Hz. Plot each of...

Generate and plot sinusoids of frequencies 300 Hz, 500 Hz and 1200 Hz. Plot each of them and their sum using the “subplot” command in one figure. Indicate the axes’ titles.

Solutions

Expert Solution

Sinusoidal signal with frequency 300Hz:

clc;
clear all;
close all;
f=300; %Frequency of signal
T=1/f; %Time period of signal
A=1; %Amplitude of sinusoidal signal
t=linspace(0,0.005,100); % Make 100 samples in the range 0 to 2 times TimePeriod(upto time interval you want).
v1=A*sin(2*pi*f*t); % sinusoidal signal function
plot(t,v1); % to plot the signal voltage amplitude vs time
xlabel('Time(sec)');
ylabel('Voltage(V)');
title('Sine wave-1');
grid on;

Sinusoidal signal with frequency 500Hz:

clc;
clear all;
close all;
f=500; %Frequency of signal
T=1/f; %Time period of signal
A=1; %Amplitude of sinusoidal signal
t=linspace(0,0.005,100); % Make 100 samples in the range 0 to 2 times TimePeriod(upto time interval you want).
v2=A*sin(2*pi*f*t); % sinusoidal signal function
plot(t,v2); % to plot the signal voltage amplitude vs time
xlabel('Time(sec)');
ylabel('Voltage(V)');
title('Sine wave-2');
grid on;

Sinusoidal signal with frequency 1200Hz:

clc;
clear all;
close all;
f=1200; %Frequency of signal
T=1/f; %Time period of signal
A=1; %Amplitude of sinusoidal signal
t=linspace(0,0.005,100); % Make 100 samples in the range 0 to 2 times TimePeriod(upto time interval you want).
v3=A*sin(2*pi*f*t); % sinusoidal signal function
plot(t,v3); % to plot the signal voltage amplitude vs time
xlabel('Time(sec)');
ylabel('Voltage(V)');
title('Sine wave-3');
grid on;

SUBPLOT:

clc;
clear all;
close all;
f1=300; %Frequency of signal
T1=1/f1; %Time period of signal
f2=500; %Frequency of signal
T2=1/f2; %Time period of signal
f3=1200; %Frequency of signal
T3=1/f3; %Time period of signal
A=1; %Amplitude of sinusoidal signal
t=linspace(0,0.02,1000); % Make 100 samples in the range 0 to 2 times TimePeriod(upto time interval you want).
v1=A*sin(2*pi*f1*t); % sinusoidal signal function
v2=A*sin(2*pi*f2*t); % sinusoidal signal function
v3=A*sin(2*pi*f3*t); % sinusoidal signal function
vt=v1+v2+v3;
subplot(4,1,1);plot(t,v1);
ylabel('sinwave_1(300Hz)');
grid on;
subplot(4,1,2);plot(t,v2);
ylabel('sinwave_1(500Hz)');
grid on;
subplot(4,1,3);plot(t,v3);
ylabel('sinwave_1(1200Hz)');
grid on;
subplot(4,1,4);plot(t,vt);
ylabel('sum of three sinusoidal signals');
grid on;
xlabel('Time(sec)');
title('Sinusoidal signal addition');
grid on;


Related Solutions

2. Please use Matlab to generate two sine waves of 100 Hz and 10 Hz frequencies,...
2. Please use Matlab to generate two sine waves of 100 Hz and 10 Hz frequencies, respectively. Both sine waves will have a peak value of 1 (peak to peak value of 2). The sampling rate is 1000 Hz (fs = 1000 Hz) and the total data point is 1000 points for each wave. Combine the two sine waves into one. Plot the combined waveform (1 point). Then, perform fft on the combined waveform. Plot the frequency amplitude spectrum from...
If a periodic signal is decomposed into five sine waves with frequencies of 50, 300, 500,...
If a periodic signal is decomposed into five sine waves with frequencies of 50, 300, 500, 700, and 1800 GHz, what is the bandwidth? Draw the spectrum in periodic and non-periodic form, assuming components have a maximum amplitude of 5,10,1510 and 5V, express this as a function of frequency. Why can’t these spectrum be sketch as a function of time?
If a periodic signal is decomposed into five sine waves with frequencies of 50, 300, 500,...
If a periodic signal is decomposed into five sine waves with frequencies of 50, 300, 500, 700, and 1800 GHz, what is the bandwidth? Draw the spectrum in periodic and non-periodic form, assuming components have a maximum amplitude of 5,10,1510 and 5V, express this as a function of frequency. Why can’t these spectrum be sketch as a function of time?
Design a bandpass active filter to pass frequencies between 700 Hz and 2100 Hz, and with...
Design a bandpass active filter to pass frequencies between 700 Hz and 2100 Hz, and with K= 63. Please include the transfer function, blot plot, multisim, and the matlab code.
Using Matlab, write code to generate Three signal components We will use a sum of sinusoids,...
Using Matlab, write code to generate Three signal components We will use a sum of sinusoids, all of which are sampled at 10 kHz. Signal 1 should contain a sum of sinusoids with frequencies at 25Hz, 40Hz and 75Hz. Signal 2 should contain a sum of sinusoids with frequencies at 600Hz, 730Hz, and 800Hz. Signal 3 should contain a sum of sinusoids with frequencies at 3500Hz, 4000Hz, and 4200Hz. Choose a variety of amplitudes and phase shifts for the sinusoids....
One of the harmonic frequencies of tube A with two open ends is 836 Hz. The...
One of the harmonic frequencies of tube A with two open ends is 836 Hz. The next-highest harmonic frequency is 912 Hz. (a) What harmonic frequency is next highest after the harmonic frequency 228 Hz? (b) What is the number of this next-highest harmonic? One of the harmonic frequencies of tube B with only one open end is 2940 Hz. The next-highest harmonic frequency is 3220 Hz. (c) What harmonic frequency is next highest after the harmonic frequency 3780 Hz?...
Generate 200 random numbers using each of the following continuous distributions and plot the histograms (a)...
Generate 200 random numbers using each of the following continuous distributions and plot the histograms (a) Uniform (use A = 3 and B = 7) (b) Exponential (use population mean = 0.2) (c) Gamma (use parameters 3 and 2) (d) Normal (use µ = 2 and σ = 5) Attach the histogram plots and reflect on what you observe. Hint: Use RAND() to generate uniform random numbers and use inverse CDF to generate random numbers for each distribution.
5. What is the skewness and kurtosis of each data set? 6. Generate a histogram plot...
5. What is the skewness and kurtosis of each data set? 6. Generate a histogram plot of each of the data sets. 7. Based on the variability of the data, what do you think the next step would be to analyze the data? Age Income 29 9315 25 6590 28 9668 27 8412 25 1654 24 2431 25 6977 19 8966 27 9327 18 3871 25 9934 19 2236 19 3035 29 2518 19 3616 19 9219 28 1090 18...
Two adjacent natural frequencies of an organ pipe are found to be 550 Hz and 650...
Two adjacent natural frequencies of an organ pipe are found to be 550 Hz and 650 Hz. a.) Calculate the fundamental frequency of the pipe. b.) Is the pipe open at both ends or open at only one end? c.) What is the length of the pipe. Please show your work and provide an answer thank you.
4)Design a band-pass filter with a passband from 500 Hz to 2000 Hz using “butter” routine...
4)Design a band-pass filter with a passband from 500 Hz to 2000 Hz using “butter” routine of MATLAB. Assume a sampling frequency of 8KHz. Let the filter order be M=4. Plot the magnitude response and provide the filter coefficients and the transfer function
ADVERTISEMENT
ADVERTISEMENT
ADVERTISEMENT