Question

In: Electrical Engineering

Write the matlab command to sample the following signals at nyquist frequency 1.x(t)=3cos(2*pi(400)t +0.3*pi) 2.x(t)=cos^2(300*pi*t)

Write the matlab command to sample the following signals at nyquist frequency

1.x(t)=3cos(2*pi(400)t +0.3*pi)

2.x(t)=cos^2(300*pi*t)

Solutions

Expert Solution

1.
%Sampling Theorem

clear all;
close all;
clc;
fs1=1000; % fs1>2*fmax
t=0:0.1:2*pi;
t1=0:99
x=3*cos(2*pi*440*t+0.3*pi);
subplot(2,1,1);
plot(t,x);
xlabel('Time-->t');
ylabel('Amplitude');
title('Continuous cosine wave');

xt=3*cos(2*pi*440*t1/fs1+0.3*pi);
subplot(2,1,2);
stem(t1,xt);
xlabel('Time');
ylabel('Amplitude');
title('Sampled singal at Nyquist rate 1KHz');

output:

2.

clear all;
close all;
clc;
fs1=1500; % sampling frequency at nyquist rate
t=0:0.1:2*pi;
x=(cos(300*pi*t)).^2;
subplot(2,1,1);
plot(t,x);
xlabel('Time-->t');
ylabel('Amplitude');
title('Continuous cosine wave');

xt=(cos(300*pi*t/fs1)).^2;
subplot(2,1,2);
stem(t,xt);
xlabel('Time');
ylabel('Amplitude');
title('Sampled singal at Nyquist rate');

output:


Related Solutions

use matlab y(t)=10*(cos(2*pi*500*t)+cos(2*pi*1000*t)+ cos(2*pi*1500*t)). e) Down sample y(t) by a factor of 6. Sketch the Fourier...
use matlab y(t)=10*(cos(2*pi*500*t)+cos(2*pi*1000*t)+ cos(2*pi*1500*t)). e) Down sample y(t) by a factor of 6. Sketch the Fourier transform with appropriate frequency axis. Check if all frequency components are correct? Up-sample the time-domain signal obtained in e) by a factor of 6. Use appropriate filter for interpolation. Sketch the Fourier transform of the up-sampled and filtered signal. Does the resulting signal show all frequency components of the original signal y(t)?
use matlab y(t)=10*(cos(2*pi*500*t)+cos(2*pi*1000*t)+ cos(2*pi*1500*t)). e) Down sample y(t) by a factor of 6. Sketch the Fourier...
use matlab y(t)=10*(cos(2*pi*500*t)+cos(2*pi*1000*t)+ cos(2*pi*1500*t)). e) Down sample y(t) by a factor of 6. Sketch the Fourier transform with appropriate frequency axis. Check if all frequency components are correct? Up-sample the time-domain signal obtained in e) by a factor of 6. Use appropriate filter for interpolation. Sketch the Fourier transform of the up-sampled and filtered signal. Does the resulting signal show all frequency components of the original signal y(t)?
Write the line x = 0:2:20; in the Command Window of MATLAB and then create a...
Write the line x = 0:2:20; in the Command Window of MATLAB and then create a Simulink model that first loads x from the Workspace, then creates a vector y such that y = 2.5x + ex , and finally sends the vector y back to the Workspace. You will need a From Workspace block, a To Workspace block, two Constant blocks, a Product block, and a Sum block. Note that there is a sample time associated with the From...
Solve the following equations: 3cos(x)+1=cos(x)3cos⁡(x)+1=cos⁡(x), where x is in the interval [0,2π)[0,2π) x=? sin(2x)=−12sin⁡(2x)=−12, where x...
Solve the following equations: 3cos(x)+1=cos(x)3cos⁡(x)+1=cos⁡(x), where x is in the interval [0,2π)[0,2π) x=? sin(2x)=−12sin⁡(2x)=−12, where x is in the interval [0,2π)[0,2π).   x=?
Find the Fourier coefficients of the following signal. x(t) = 5 + 2sin(w0.t) + cos(2.w0.t) -...
Find the Fourier coefficients of the following signal. x(t) = 5 + 2sin(w0.t) + cos(2.w0.t) - 3sin(2.w0.t)
USING MATLAB.... a.) Create anonymous functions: fa(x)=sin(x^2) fb(x)=sin^2(x) b.) Evaluate them both at x=1/2 pi c.)Evaluate...
USING MATLAB.... a.) Create anonymous functions: fa(x)=sin(x^2) fb(x)=sin^2(x) b.) Evaluate them both at x=1/2 pi c.)Evaluate them both at x=(0,1,2,...,10)^T d.) Calculate fa(fb(2)) and fb(fa(2))
Use MATLAB to plot the functions u = 2 log10(60x + 1) and υ = 3 cos(6x) over the interval 0 ≤ x ≤ 2.
Use MATLAB to plot the functions u = 2 log10(60x + 1) and υ = 3 cos(6x) over the interval 0 ≤ x ≤ 2. Properly label the plot and each curve. The variables u and represent speed in miles per hour; the variable x represents distance in miles.
Find the mean and the Variance of the following sample data:             x Frequency (f) 1...
Find the mean and the Variance of the following sample data:             x Frequency (f) 1 5 2 6 4 9 8 6 12 4
Given following ODE's 1) x' = x / 1+t, with x(0) = 1 find x(2) 2)...
Given following ODE's 1) x' = x / 1+t, with x(0) = 1 find x(2) 2) x' = t+x with x(0) = 1, find x(2) 3) x' = t-x, with x(1) =2 find x(3) 4) x' = t-x/t+x, with x(2) = 1, find x(4) a) Solve each of the ODE's using Euler's method with h = 0.5, and calculate the relative error i) x' = x/1+t: Approximation ____________________ Relative error: ________________ ii) x'= t+x; Approximation ____________________ Relative error: ________________ iii)...
PROBABILITY 2. Given the following table x 0 1 2 3 Pr(X=x) 0.25 0.4 0.3 0.05...
PROBABILITY 2. Given the following table x 0 1 2 3 Pr(X=x) 0.25 0.4 0.3 0.05 answer each of the questions. Find µX and σX . Given that                           Y = -X+2 find µY and σY . 2B. Suppose that in the game of AFL the mean total number of points per match is 185 with a standard deviation of 33. Suppose that a season involves 202 matches. If the total points are normally distributed then answer the following questions....
ADVERTISEMENT
ADVERTISEMENT
ADVERTISEMENT