hw1soln - Q1) MATLAB CODE %CREATE 3 SINUSOIDES OUT OF PHASE...

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

View Full Document Right Arrow Icon
Q1) Q2) MATLAB CODE %CREATE 3 SINUSOIDES OUT OF PHASE BY 120 degrees time = 0:0.1:3*pi; SIN1 = sin(time); SIN2 = sin(time+2*pi/3); SIN3 = sin(time+4*pi/3); %PLOT SINUSOIDS AND SUM OF SINUSOIDS plot(time, SIN1, '--'); hold on; plot(time, SIN2, '-o'); plot(time, SIN3, '-x'); plot(time, SIN1+SIN2+SIN3, 'v'); grid on; MATLAB CODE % I1 I2 I3 I4 I5 V MESH = [(5+1+6) -(6) 0 -(1) 0 12; -(6) (6+1+1+8) -(8) -(1) -(1) 0; 0 -(8) (8+1+6) 0 -(1) 9; -(1) -(1) 0 (1+1+2+3) -(2) 6; 0 -(1) -(1) -(2) (1+1+2+4) 10]; %PRODUCE REDUCED ROW ECHELON FORM rref(MESH) OUTPUT ans = 1.0000 0 0 0 0 2.1701 0 1.0000 0 0 0 1.9912 0 0 1.0000 0 0 1.8119 0 0 0 1.0000 0 2.0942 0 0 0 0 1.0000 2.2489
Background image of page 1

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

View Full DocumentRight Arrow Icon
MATLAB CODE % V1 V2 V3 I MESH2 = [(1/2+1/4+1/1) -(1/4) -(1/1) 20; -(1/4) (1/4+1/2+1/4) -(1/4) 5; -(1/1) -(1/4) (1/1+1/4) 10-5]; MESH2 %PRODUCE REDUCED ROW ECHELON FORM rref(MESH2) OUTPUT MESH2 = 1.7500 -0.2500 -1.0000 20.0000 -0.2500 1.0000 -0.2500 5.0000 -1.0000 -0.2500 1.2500 5.0000 ans = 1.0000 0 0 36.4286 0 1.0000 0
Background image of page 2
Background image of page 3
This is the end of the preview. Sign up to access the rest of the document.

This note was uploaded on 01/19/2012 for the course EECE 253 taught by Professor Shuo,tang during the Spring '11 term at The University of British Columbia.

Page1 / 3

hw1soln - Q1) MATLAB CODE %CREATE 3 SINUSOIDES OUT OF PHASE...

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

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