Question

a) Let ?(?) = { 1 for 0 ≤ ? ≤ 1 and −1, for 2 ≤ ? ≤ 3 be a periodic signal with fundamental period 3. Calculate the Fourier Series coefficients of ?(?), ??, by hand. Simplify your result as much as you can.

b) By using a 3x1 subplot, plot ?(?) signal in the first row. Take ? between 0 s and 10 s with an increment of 1 ms. Furthermore, calculate and plot the Fourier series representation of ?(?) = ∑ ??? ? ???0? ?=−? for ? = 10 and ? = 100 in the second and third rows of the subplot. Note that, ?(?) = ∑ ??? ? ???0? ?=−? should be calculated by MATLAB. Please comment on increasing ? on your results. Do not forget axis labels.

Answer #1

clc

clear all

t = linspace(0,10,10000);

x = [ones(1,1000) zeros(1,1000) -1*ones(1,1000) ones(1,1000)
zeros(1,1000) -1*ones(1,1000) ones(1,1000) zeros(1,1000)
-1*ones(1,1000) ones(1,1000)];

N1 = 10;

N2 = 100;

x1 = zeros((2*N1+1),size(t,2));

x2 = zeros((2*N2+1),size(t,2));

p = 0-N1;

q = 0-N2;

for i = 1:(2*N1+1)

x1(i,:) = x1(i,:) + (1/(j*p*pi))*(1 -
cos(2*p*pi/3))*exp((j*p*2*pi*t)/3);

p = p+1;

end

x1((N1+1),:) = zeros(size(t));

for i = 1:(2*N2+1)

x2(i,:) = x2(i,:) + (1/(j*q*pi))*(1 -
cos(2*q*pi/3))*exp((j*q*2*pi*t)/3);

q = q+1;

end

x1((N1+1),:) = zeros(size(t));

x2((N2+1),:) = zeros(size(t));

subplot(3,1,1)

plot(t, x, 'r-', 'MarkerFaceColor', 'r', ...

'MarkerSize', 12);

xlabel('time')

ylabel('magnitude')

title('x(t) original')

subplot(3,1,2)

plot(t, sum(x1), 'r-', 'MarkerFaceColor', 'r', ...

'MarkerSize', 12);

xlabel('time')

ylabel('magnitude')

title('x(t) with N = 10')

subplot(3,1,3)

plot(t, sum(x2), 'r-', 'MarkerFaceColor', 'r', ...

'MarkerSize', 12);

xlabel('time')

ylabel('magnitude')

title('x(t) with N = 100')

With increasing N the fourier series approximation tends towards original x(t).

SIGNALS AND SYSTEMS
Experiment 1
Signal Generation
Date: January 1-8, 2018
The purpose of this laboratory is to familiarize you with the
basic commands in MATLAB for signal generation and verify the
generated signal.
Objectives
1.Learn basic MATLAB commands and
syntax, including help system.
2.Use MATLAB ( from
Citrix) to generate and plot different
signals.
Assignments
Generate and plot the signal
x1(t) = 1+ sin
(4pt), for t
ranging from -1 to 1 in 0.001 increments. Use proper axes...

Q)
a) create a matrix named as X of evenly spaced values from 0 to
50, with an increment of 10.
b) a) create a matrix named as Y of evenly spaced values from 500
to 1000, with an increment of 3.
c)a) create a matrix named as Z, the value of the 1st row is from 1
to 10, 2nd row from 2 to 20 with increment of 2, 3rd row 3 to
12.
using subplot divide the window...

Fourier Series Approximation Matlab HW1:
You are given a finite function xt={-1 0≤t≤5; 1
5<t≤10 .
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...

Assignments
Generate and plot the signal
x1(t) = 1+ sin
(4pt), for t
ranging from -1 to 1 in 0.001 increments. Use proper axes labels
with title.
Generate and plot the function
x2(t) = sin
(30pt), for t
ranging from -1 to 1 in 0.001 increments. Use proper axes labels
with title.
Generate and plot the combination function
x3(t) =
x1(t)*x2(t) as above. Use
proper axes labels with title.
Generate and plot the sum of
two cosine waves
v1(t) =...

Using Matlab to solve the problem below
Given
X=[-2 -1 0 1 2]
Y=[1.5 3.2 4.5 3.4 2]
a). Plot a scatter plot of the data
b). Determine the coefficients of the
polynomial ?0 + ?1? +
?2?2 which best fits the data
c). Plot this function on the same plot as in
part ‘a’.
USE MATLAB CODE ONLY!
USE MATLAB CODE ONLY!
THANK YOU

Consider the first full period of the sine function:
sin(x), 0 < x < 2π.
(1) Plot the original function and your
four-term approximation using a computer for the range −2π < x
< 0. Comment.
(2) Expand sin(x), 0 < x < 2π, in a
Fourier sine series.

Given signal x(t) = sinc(t):
1. Find out the Fourier transform of x(t), find X(f), sketch
them.
2. Find out the Nyquist sampling frequency of x(t).
3. Given sampling rate fs, write down the expression of the
Fourier transform of xs(t), Xs(f) in terms of X(f).
4. Let sampling frequency fs = 1Hz.
Sketch the sampled signal xs(t) = x(kTs) and the Fourier
transform of xs(t), Xs(f).
5. Let sampling frequency fs = 2Hz. Repeat 4.
6. Let sampling frequency...

Let f have a power series representation, S. Suppose that
f(0)=1, f’(0)=3, f’’(0)=2 and f’’’(0)=5.
a. If the above is the only information we have, to what degree
of accuracy can we estimate f(1)?
b. If, in addition to the above information, we know that S
converges on the interval [-2,2] and that |f’’’’(x)|< 11 on that
interval, then to what degree of accuracy can we estimate
f(1)?

2. Express the function f(t) = 1, -5<t<0
2, 0<t<5
with f(t+10)=f(t), as a Fourier series.

Calculate the Fourier series expansion of the function:
f(x)
=1/2(π-x) , when 0
< x ≤ π and
f(x) = -
1/2(π+x), when -π
≤ x < 0

ADVERTISEMENT

Get Answers For Free

Most questions answered within 1 hours.

ADVERTISEMENT

asked 9 minutes ago

asked 13 minutes ago

asked 23 minutes ago

asked 32 minutes ago

asked 37 minutes ago

asked 40 minutes ago

asked 41 minutes ago

asked 46 minutes ago

asked 56 minutes ago

asked 1 hour ago

asked 1 hour ago

asked 1 hour ago