summaryrefslogtreecommitdiff
path: root/3754/CH6/EX6.3/6_3.sce
blob: 1a4d0e8bfbb425375254636702ed72130e0b22a8 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
clear//

//Variables

n = 5.0                  //number of cycles
t = 10.0                 //time period (in micro-seconds)

//Calculation

f = n / t                //frequency (in Mega-hertz)
T = 1/f                  //Time period (in micro-seconds)

//Result

printf("\n Frequency and Time period of the sine wave is  %0.3f  MHz and  %0.3f  micro-seconds.",f,T)