blob: 95d8b768f012c6774cf91978230b3d2adfd2896b (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
|
theta=linspace(0,2*%pi,100)
i=10+10*sin(theta)//expression for the resultant wave
plot2d(theta,i)
xtitle("Wave shape for example 6.7","theta","current")
//calculating average value of the resultant wave
Iavg=integrate('10+10*sin(theta)','theta',0,2*%pi)/(2*%pi)
mprintf("Average value of the resultant current wave=%d A\n",Iavg)
//calculating RMS value of current of the resultant wave
Irms=sqrt(integrate('(10+10*sin(theta))^2','theta',0,2*%pi)/(2*%pi))
mprintf("RMS value of the resultant current wave=%f A",Irms)
|