summaryrefslogtreecommitdiff
path: root/3588/CH10/EX10.1/EX10_1.sce
blob: aa12a0a1d669ceffe5ec43c2dd4f1e169e23c736 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
//Clearing console
clc
clear

//Intializing variables
mg = 20
k = 25
g = 386.4

//Calculating circular frequency
w = sqrt(k*g/mg)

//Solving for constants in equation of motion
fi = acosd(0/w)
C = (2.3-0.8)/sind(fi)

//Circular frequency in Hz
f = w/(2*%pi)

printf('\nResults\n')
printf('\nCircular Frequency =%fHz\n Amplitude =%fin\n Phase Angle =%fdegree',f,C,fi)