project2_solutions

project2_solutions - ECE 301 Project 2 Solutions Daniel...

Info iconThis preview shows pages 1–4. Sign up to view the full content.

View Full Document Right Arrow Icon
ECE 301 Project 2 Solutions Daniel Aguiar Summer 2010 1 Square Wave a k = sin ( πk 2 ) πk (1) b k = 2 sin ( πk 2 ) πk (2) -1 0 1 -0.2 0 0.2 0.4 0.6 0.8 1 1.2 -1 0 1 -0.2 0 0.2 0.4 0.6 0.8 1 1.2 -1 0 1 -0.2 0 0.2 0.4 0.6 0.8 1 1.2 -1 0 1 -0.2 0 0.2 0.4 0.6 0.8 1 1.2 -1 0 1 -0.2 0 0.2 0.4 0.6 0.8 1 -1 0 1 -0.2 0 0.2 0.4 0.6 0.8 1 -1 0 1 -0.2 0 0.2 0.4 0.6 0.8 1 -1 0 1 -0.2 0 0.2 0.4 0.6 0.8 1 1
Background image of page 1

Info iconThis preview has intentionally blurred sections. Sign up to view the full version.

View Full DocumentRight Arrow Icon
-1 -0.8 -0.6 -0.4 -0.2 0 0.2 0.4 0.6 0.8 1 -0.2 0 0.2 0.4 0.6 0.8 1 2 Saw Tooth a k = - ( - 1) k jπk (3) b k = - 2 ( - 1) k πk (4) -5 0 5 -0.2 0 0.2 0.4 0.6 0.8 1 1.2 -5 0 5 -1 -0.5 0 0.5 1 -5 0 5 -1 -0.5 0 0.5 1 -5 0 5 -1 -0.5 0 0.5 1 -5 0 5 -1 -0.5 0 0.5 1 -5 0 5 -1 -0.5 0 0.5 1 -5 0 5 -1 -0.5 0 0.5 1 -5 0 5 -1 -0.5 0 0.5 1 2
Background image of page 2
-3 -2 -1 0 1 2 3 -1 -0.8 -0.6 -0.4 -0.2 0 0.2 0.4 0.6 0.8 1 3 Code %Script to generate solutions for ECE 301 Project 1 %Daniel Aguiar %Purdue University %Summer 2010 %Square Wave ******************************************* clear close all clc load square_wave; N_harmonics = 7; k = 1:1:N_harmonics; b_k = [1/2 2*sin(pi*k/2)./(pi*k)]; x_tilde = zeros(N_harmonics+1,length(t)); x_tilde(1,:) = b_k(1)*ones(size(x));
Background image of page 3

Info iconThis preview has intentionally blurred sections. Sign up to view the full version.

View Full DocumentRight Arrow Icon
Image of page 4
This is the end of the preview. Sign up to access the rest of the document.

Page1 / 4

project2_solutions - ECE 301 Project 2 Solutions Daniel...

This preview shows document pages 1 - 4. Sign up to view the full document.

View Full Document Right Arrow Icon
Ask a homework question - tutors are online