function
x(t) = sin(4*pi*t) 0<t<1/2
x(t) = 0 1/2<t<1
x(t) = x2(t+1)
Determine ak coefficients for x(t)
Plot the approximation using matlab of x(t) using ak coefficients
for |k|<=11


----------------------
%matlab
T=1;
t=-2*T:0.01*T:2*T;
x=zeros(size(t));
K=11;
for k=-K:K
ak=sinc(1-0.5.*k).*exp(1i.*pi.*(1-0.5.*k))-sinc(1+0.5.*k).*exp(-1i.*pi.*(1+0.5.*k));
ak=ak.*(-0.25i);
x=x+ak.*exp(1i.*k.*2.*pi.*t);
end
plot(t,x)
xlabel('t');
ylabel('x(t)');
title('fourier approximation of x(t)');
-----------------

function x(t) = sin(4*pi*t) 0<t<1/2 x(t) = 0 1/2<t<1 x(t) = x2(t+1) Determine ak coefficients for...
MATLAB %% T = 1; N = 11; np = 2; dt = 0.001; tmax = np*T; t = -tmax:dt:tmax; %% Function 1 %the following code was used to create the x(t) function xrange = floor((T/dt)/15); x1 = linspace(0,1,xrange); x2 = x1(end-1:-1:1); x3 = linspace(0,2,2*xrange); x4 = x3(end-1:-1:1); x5 = zeros(1,xrange); x6 = x1; x7 = 2*ones(1,xrange); x8 = 1+x2; x9 = -0.5*ones(1,xrange); x10 = x1/2-0.5; xtemp = [x1 x2 x3 x4 x5 x6 x7 x8 x9 x10]; ztemp =...
You are given a finite step function xt=-1 0<t<4 1 4<t<8. Hand calculate the FS coefficients of x(t) by assuming half- range expansion, for each case below. Modify the code below to approximate x(t) by cosine series only (This is even-half range expansion). Modify the below code and plot the approximation showing its steps changing by included number of FS terms in the approximation. Modify the code below to approximate x(t) by sine series only (This is odd-half range expansion).. Modify...
Calculate the Fourier Series coefficients of x(t) = cos(2*pi*1*t) + 2*sin(2*pi*4*t). Based on your results which set of FS coefficients corresponding to the positive side of the spectra is correct. a0=0, a1=1/2, a2=1/j, a3 = 0 a1=1, a2=2, a3 = 0 a1=1/2j, a2=1/2, a3 = 0 a1=1/2, a2=2/2j, a3 = 0
could you please solve this problem using
Matlab
4. Using the Fourier series coefficients {ak} obtained, construct the following signal N(t)>akekwot k=-N where ak is the kth Fourier series coefficients of r(t). Therefore, N(t) is the so-called 2N-term approximation of original signal r(t). In one figure, plot âN(t) versus t, for N 10, 20, 30, 40. In the same plot, also plot original signal (t). Visually compare N(t) and r(t) in the figure and comment on your observations
Plot the following function on MATLAB h(t) = cos(pi*t/2) -2 <= t < -1 1 + t3 -1 <= t < 0 1 0 <= t < 1 1 + sin(2*pi*t) 1 <= t < 2 0 elsewhere
Find the integral using matlab quad inbuilt for function (x^2)*cos(x)+3*sin(x)*tan(x) for 0 to pi/4
Project in matlab. I have the correct ak value but not the
correct ao value. My code is attached below also
2. Determine and plot the magnitude and phase spectrum of the Fourier series coefficients a, that is, plot ja, I as a function of discrete frequencies Jok and La, as a function of discrete frequencies fok 03 025 蓋0.2 0.15 0.1 o o5 ·10-8-6 4610 phase -2 -2 8- t= 0: .01:4; 9- to = 4; 10- fo =1/4;...
efficients Wi for the signal w(t) sin(16rt) 14. (8 pts) Determine the FS coefficients W, for the signal w(t) 3 cos(12rt)-5 sin(16rt). (c) (9 pts) Suppose a MATLAB anonymous function X already exists that correctly defines X() Write MATLAB code that uses X to reconstruct and then plot a 10-periodic replication of e(t) over-10sts10.
efficients Wi for the signal w(t) sin(16rt) 14. (8 pts) Determine the FS coefficients W, for the signal w(t) 3 cos(12rt)-5 sin(16rt).
(c) (9 pts) Suppose...
Matlab help
1) Given the functions x1()= tu()-tuft-1) and X2(t)=10e-5,11(), do the following: 1. Plotx,(t) and x2(0) using MATLAB 2. Use MATLAB to find and plot x(0=x:@*.x2(t), where * denotes convolution. 3. Find x(t)=x;()*X2(1) by hand using Laplace transforms. 4. Plot the result of part 3 in MATLAB and compare it to that found in part 2. 2) Given the transfer function shown below, do the following: 1. Find the system's impulse response and plot it using MATLAB 2. Repeat...
(1 point) Suppose you're given the following Fourier coefficients for a function on the interval [-π, π : ao = 2, ak = 0 for k 2 i, and for k > 1. Find the following Fourier approximations to the Fourier series a0 + 〉 ,(an cos(nz) + bn sin(nx)) bk = F, (z) = F,(z) = Fs(x)
(1 point) Suppose you're given the following Fourier coefficients for a function on the interval [-π, π : ao = 2, ak...