{[ promptMessage ]}

Bookmark it

{[ promptMessage ]}

hw1soln

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

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

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

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

View Full Document
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 23.5714