abcasdasd

1
% to plot a voltage and lagging current waveform f=input('enter the value of frequency'); n=input('enter no. of cycles'); t=[0:1e-4:0.04]; v=5*sin(2.*pi.*f.*t) i=2*sin(2.*pi.*f.*t-(pi/3)) plot(t,v,t,i) 0 0.005 0.01 0.015 0.02 0.025 0.03 0.035 0.04 -5 -4 -3 -2 -1 0 1 2 3 4 5 tim e (sec) voltageandcurrent voltage currentand tim e graph

Upload: sharukh-khan

Post on 20-Nov-2015

3 views

Category:

Documents


0 download

DESCRIPTION

asdasdasdasdasdasd

TRANSCRIPT

% to plot a voltage and lagging current waveformf=input('enter the value of frequency');n=input('enter no. of cycles');t=[0:1e-4:0.04];v=5*sin(2.*pi.*f.*t)i=2*sin(2.*pi.*f.*t-(pi/3))plot(t,v,t,i)