(A) MATLAB CODE:
clc
clear all
close all
F =
10;
% Frequency in KHz
T = 1/F;
Ts = 0.001; %
Sample time in ms
Tstop = input('Enter Tstop in ms:');
t = 0:Ts:Tstop; % Time t in ms
% Sinusoidal with frequency F
x = sin(2*pi*F.*t);
Tp = 1;
Wp = 0.5;
% Generating Pulse with width Wp and Pulse Repetition Tp
y = [];
for n = 1:Tstop
if n == 1
for i =
1:length(t)
if t(i) >= 0 & t(i) < Wp
y = horzcat(y,1);
elseif t(i) >= Wp & t(i) <= Tp
y = horzcat(y,0);
end
end
elseif n > 1
for i =
1:length(t)
if t(i) >= 0 & t(i) < Wp
y = horzcat(y,1);
elseif t(i) >= Wp & t(i) < Tp
y = horzcat(y,0);
end
end
end
end
z = x.*y; % Pulsed Sine Wave Signal
plot(t,z,'r')
xlabel('t in ms')
title('Pulsed Sinewave Signal')
grid on
OUTPUT:
Tstop = 1 ms
Tstop = 5 ms
(B) MATLAB CODE:
clc
clear all
close all
F =
10;
% Frequency in KHz
T = 1/F;
Ts = 0.001; %
Sample time in ms
Tstop = input('Enter Tstop in ms:');
ts = 0.01; % Sampling time interval
t = 0:Ts:Tstop; % Time t in ms
% Sinusoidal with frequency F
x = sin(2*pi*F.*t);
Tp = 1;
Wp = 0.5;
% Generating Pulse with width Wp and Pulse Repetition Tp
y = [];
for n = 1:Tstop
if n == 1
for i =
1:length(t)
if t(i) >= 0 & t(i) < Wp
y = horzcat(y,1);
elseif t(i) >= Wp & t(i) <= Tp
y = horzcat(y,0);
end
end
elseif n > 1
for i =
1:length(t)
if t(i) >= 0 & t(i) < Wp
y = horzcat(y,1);
elseif t(i) >= Wp & t(i) < Tp
y = horzcat(y,0);
end
end
end
end
z = x.*y; % Pulsed Sine Wave Signal
stem(t*ts,z,'r')
xlabel('n')
title('Sampled Pulsed Sinewave Signal')
OUTPUT:
Tstop = 1 ms
Tstop = 5 ms
(A.) Use MATLAB to generate a pulsed sine wave signal having a frequency F-10KHZ and a...
Need MatLab code
Exercise: Use MATLAB to generate the sinusoidal waveform: x(t) = 3 cos(1200) Consider the frequency of this sinusoid and use this information to select an appropriate time-step and time array that will allow this signal to be correctly represented and displayed on a new MATLAB figure window (display 4 periods of this wave only). Now set up an appropriate frequency array and use the fft() and fftshift() functions to generate and plot the Fourier Transform (magnitude spectra)...
need matlab code
Exercise: Use MATLAB to generate a low frequency signal: xy(t) = 3 cos(1400) And a higher frequency signal: xz(t) = 2 cos(10,000st) Now add these two signals together to generate the dual-component signal: y(t) = 3 cos(14007a)+ 2 cos(10,000) Points to be addressed: Again, manually calculate the theoretical magnitude spectra of y(t) and show this in your report (use Microsoft Visio or similar for your diagram). Clearly label all axes! Contrast this working to what you see...
FFT = fast Fourier Transform.
16) Calculate the maximum magnitude error of a 1024 point FFT for sine wave input signal and rectangle window. What is the frequency resolution of the FFT for a sample rate of 20 kHz. How can this resolution be increased ? (3)
16) Calculate the maximum magnitude error of a 1024 point FFT for sine wave input signal and rectangle window. What is the frequency resolution of the FFT for a sample rate of 20...
Part A:- Synthesising a Discrete Signal using Matlab: Using a sampling frequency of 8000 Hz, determine the discrete signal, x[n] that is obtained from sampling a 1000 Hz sine wave, with a peak magnitude of 0.8. (that is, x(t)-0.8cos(2rtft)). Determine an equation for xin] in terms of 'n' and then create the signal in Matlab. (Remember in this case 'n' is your independent variable not t'.) Play the x[n] signal through the PC soundcard using the 'sound' command in Matlab....
Frequency Analysis Quiz Q1. You have been asked to generate a single signal by summing three different sine waves of equal length (say 5 seconds). The resulting signal is sampled at a rate of 250 Hz. The frequencies of the sinusoidal components are 25 Hz, 40 Hz and 95 Hz. The amplitudes of the signals are 2.0,3.0 and 5.0 units respectively. You have been asked to plot the signal against time. Write the text for a simple m- script that...
Given taple 3,please solve for part(d)-part(f)
hange the mode on the signal generator to sine-wave, with a peak-to-peak amplitude of eak-to-peak amplitude of the voltage across the capacitor for various frequencies (100, 4 500, 2000, and 5000 Hz), and complete Table 3, (0.4%) Table 3 Frequency (in Hertz) 100 400 800 1000 1500 2000 5000 Vc (peak-to-peak) ange the mode on the signal generator to sine-wave, with a peak-to-peak amplitude of 2V. Measure the 1500, 2000, and 5000 Hz), and...
Now use MATLAB to generate and plot 15seconds of this signal
in the time-domain.Use the fft() function to find the fourier
transform of this signal and plot its magnitude spectrum
School of Engineering Task 3 - The Fourier Transform: Scaling property Exercise: Let's take a look now at using the Fourier transform on aperiodic signals. Consider the real exponential signal from the discharging capacitor in tas 3 of laboratory 1 which was found to be: You(t)=e"u(t) Begin by calculating manually...
given table 4 and nowing tau was measured(0.15ms) please solve for
part d,e,f
Thanks
hange the mode on the signal generator to sine-wave, with a peak-to-peak amplitude of 2 eak-to-peak amplitude of the voltage across the resistor for various frequencies (100, 400 500, 2000, and 5000 Hz), and complete Table 4, (04%) Table 4 Frequency (in Hertz) 100 400 800 1000 1500 2000 50 VR (peak-to-peak) (d) From Table 4, sketch the frequency response curve (lv versus frequency) of the...
Program from problem 1: (Using MATLAB)
% Sampling frequency and sampling period
fs = 10000;
ts = 1/fs;
% Number of samples, assume 1000 samples
l = 1000;
t = 0:1:l-1;
t = t.*ts; % Convert the sample index into time for generation and
plotting of signal
% Frequency and amplitude of the sensor
f1 = 110;
a1 = 1.0;
% Frequency and amplitude of the power grid noise
f2 = 60;
a2 = 0.7;
% Generating the sinusoidal waves...
Use MATLAB to: Design an Echo Filter. The output should be the original signal followed by three echoes with attenuations of 10%, 15 % and 25% respectively and the delays should be 0.9 sec, 1.4 sec, and 1.8 sec respectively for each echo. Hint: Based on this information the original signal appears at the output with the same amplitude, the first echo has amplitude 0.9 times the amplitude of the original (10% attenuation), the second echo has amplitude 0.85 (15%...