MATHS LAB ACTIVITY-20/06/2020: by - M.Naveen Reg-19BCN7185 SLOT-L1+L2
MATHS LAB ACTIVITY-20/06/2020: by - M.Naveen Reg-19BCN7185 SLOT-L1+L2
MATHS LAB ACTIVITY-20/06/2020: by - M.Naveen Reg-19BCN7185 SLOT-L1+L2
By -M.Naveen
Reg-19BCN7185
SLOT-L1+L2
QUESTION -1
syms X q
x=[0,1,2,3,4,5]
x = 1×6
0 1 2 3 4 5
y=[9,18,24,28,26,20]
y = 1×6
9 18 24 28 26 20
N=length(y)
N = 6
interval=360/N
interval = 60
Q=[0,60,120,180,240,300]
Q = 1×6
0 60 120 180 240 300
c1=sind(Q)
c1 = 1×6
0 0.8660 0.8660 0 -0.8660 -0.8660
c2=cosd(Q)
c2 = 1×6
1.0000 0.5000 -0.5000 -1.0000 -0.5000 0.5000
s1=0,s2=0
s1 = 0
s2 = 0
for i=1:N 1
f1=y(i)*c1(i)
f1 = 0
f1 = 15.5885
f1 = 20.7846
f1 = 0
f1 = -22.5167
f1 = -17.3205
for i=1:N
f2=y(i)*c2(i)
s2=s2+f2;
end
f2 = 9
f2 = 9
2
f2 = -12
f2 = -28
f2 = -13
f2 = 10
s1
s1 = -3.4641
s2
s2 = -25
sum1=sum(y)
sum1 = 125
a0=(1/N)*sum1
a0 = 20.8333
a1=(2/N)*s2
a1 = -8.3333
b1=(2/N)*s1
b1 = -1.1547
amptitude=sqrt(a1^2+b1^2)
amptitude = 8.4130
f(X) =
2-QUESTION
1
syms x q y=[0.9,8,7.2,5.6,3.6,1.7,0.5,0.2,0.9,2.5,9.7,6.8]
y = 1×12
0.9000 8.0000 7.2000 5.6000 3.6000 1.7000 0.5000 0.2000
N=length(y)
N = 12
interval=360/N
interval = 30
Q=0:interval:330
Q = 1×12
0 30 60 90 120 150 180 210 240 270 300 330
c1s=sind(Q)
c1s = 1×12
0 0.5000 0.8660 1.0000 0.8660 0.5000 0 -0.5000
c1c=cosd(Q)
c1c = 1×12
1.0000 0.8660 0.5000 0 -0.5000 -0.8660 -1.0000 -0.8660
c2s=sind(2*Q)
c2s = 1×12
0 0.8660 0.8660 0 -0.8660 -0.8660 0 0.8660
c2c=cosd(2*Q)
c2c = 1×12
1.0000 0.5000 -0.5000 -1.0000 -0.5000 0.5000 1.0000 0.5000
s1=0,s2=0
s1 = 0
s2 = 0
for i=1:N
f1=y(i)*c1s(i)
f2=y(i)*c2s(i)
s1=s1+f1; s2=s2+f2;
end
f1 = 0
f2 = 0
f1 = 4
f2 = 6.9282
f1 = 6.2354
f2 = 6.2354
f1 = 5.6000
2
f2 = 0
f1 = 3.1177
f2 = -3.1177
f1 = 0.8500
f2 = -1.4722
f1 = 0
f2 = 0
f1 = -0.1000
f2 = 0.1732
f1 = -0.7794
f2 = 0.7794
f1 = -2.5000
f2 = 0
f1 = -8.4004
f2 = -8.4004
f1 = -3.4000
f2 = -5.8890
s11=0,s22=0
s11 = 0
s22 = 0
for i=1:N
f11=y(i)*c1c(i)
f22=y(i)*c2c(i)
s11=s11+f11;
s22=s22+f22;
end
f11 = 0.9000
f22 = 0.9000
f11 = 6.9282
f22 = 4
f11 = 3.6000
f22 = -3.6000
f11 = 0
f22 = -5.6000
f11 = -1.8000
f22 = -1.8000
f11 = -1.4722
f22 = 0.8500
f11 = -0.5000
f22 = 0.5000
f11 = -0.1732
f22 = 0.1000
f11 = -0.4500
f22 = -0.4500
f11 = 0
f22 = -2.5000
f11 = 4.8500
f22 = -4.8500
f11 = 5.8890
f22 = 3.4000
sum1=sum(y)
sum1 = 47.6000
s1
s1 = 4.6232
s2
s2 = -4.7631
s11
s11 = 17.7717
s22
s22 = -9.0500
a0=(1/N)*sum1
a0 = 3.9667
a1=(2/N)*s1
a1 = 0.7705
a2=(2/N)*s2
a2 = -0.7939
b1=(2/N)*s11
b1 = 2.9620
b2=(2/N)*s22
b2 = -1.5083
f(x) =
1
3-Question
syms T x
T=[0, T/6 ,T/3, T/2, 2*T/3, 5*T/6]
T =
N=length(T)
N = 6
interval=360/N
interval = 60
Q=0:interval:300
Q = 1×6
0 60 120 180 240 300
c1s=sind(Q)
c1s = 1×6
0 0.8660 0.8660 0 -0.8660 -0.8660
c1c=cosd(Q)
c1c = 1×6
1.0000 0.5000 -0.5000 -1.0000 -0.5000 0.5000
c2s=sind(2*Q)
c2s = 1×6
0 0.8660 -0.8660 0 0.8660 -0.8660
c2c=cosd(2*Q)
c2c = 1×6
1.0000 -0.5000 -0.5000 1.0000 -0.5000 -0.5000
s1=0,s2=0
s1 = 0
s2 = 0
for i=1:N 2
f1=I(i)*c1s(i)
f2=I(i)*c2s(i)
f1 = 0
f2 = 0
f1 = 1.1258
f2 = 1.1258
f1 = 0.9093
f2 = -0.9093
f1 = 0
f2 = 0
f1 = 0.7621
f2 = -0.7621
f1 = 0.2165
f2 = 0.2165
s11=0,s22=0
s11 = 0
s22 = 0
for i=1:N
f11=I(i)*c1c(i)
f22=I(i)*c2c(i)
s11=s11+f11;
s22=s22+f22;
end
f11 = 1.9800
f22 = 1.9800
f11 = 0.6500
f22 = -0.6500
f11 = -0.5250
f22 = -0.5250
f11 = -1.3000
f22 = 1.3000
f11 = 0.4400
f22 = 0.4400
f11 = -0.1250
f22 = 0.1250
sum1=sum(I)
sum1 = 4.5000
s1
s1 = 3.0138
s2
s2 = -0.3291
s11
s11 = 1.1200
s22
s22 = 2.6700
a0=(1/N)*sum1
a0 = 0.7500
a1=(2/N)*s1
a1 = 1.0046
a2=(2/N)*s2
a2 = -0.1097
b1=(2/N)*s11
b1 = 0.3733
b2=(2/N)*s22
b2 = 0.8900
f(x) =
amptitude=sqrt(a1^2+b1^2)
amptitude = 1.0717
second_harmonicamp=sqrt(a2^2+b2^2)
second_harmonicamp = 0.8967