diff options
Diffstat (limited to '3532/CH1/EX1.7')
-rw-r--r-- | 3532/CH1/EX1.7/Ex1_7.sce | 26 |
1 files changed, 26 insertions, 0 deletions
diff --git a/3532/CH1/EX1.7/Ex1_7.sce b/3532/CH1/EX1.7/Ex1_7.sce new file mode 100644 index 000000000..fe16f356e --- /dev/null +++ b/3532/CH1/EX1.7/Ex1_7.sce @@ -0,0 +1,26 @@ +clc
+clear
+mprintf('Mechanical vibrations by G.K.Grover\n Example 1.6.2\n')
+//given data
+//Z=r*e^(i*theta) is represented as Z=r*cos(theta) + i*r*sin(theta)= x +i*y
+//where r*cos(theta)=x and r*sin(theta)=y
+//case 1
+//V=5*e^(j*0.10)
+r1=5
+theta1=0.1
+x1=r1*cos(theta1)
+y1=r1*sin(theta1)
+v1=complex(x1,y1)
+//case 2
+//V=17*e^(-j*3.74)
+r2=17
+theta2=-3.74
+x2=r2*cos(theta2)
+y2=r2*sin(theta2)
+v2=complex(x2,y2)
+//output
+mprintf('case(i):V=5*e^(j*0.10) is represented as')
+disp(v1)
+mprintf('\ncase(ii):V=17*e^(-j*3.74) is represented as')
+disp(v2)
+mprintf('\nNOTE:complex number is represented as x+y*i in SCILAB')
|