summaryrefslogtreecommitdiff
path: root/2459/CH21/EX21.2/Ex21_2.sce
blob: 105359a2a6ac5819a02616521b79983b95ad39de (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
//chapter21
//example21.2
//page463

R=10d3 // ohm
C=0.01d-6 // F

T=1.4*R*C
f=1/T

printf("time period of square wave = %.3f ms \n",T*1000)
printf("frequency of square wave = %.3f kHz \n",f/1000)

// the accurate answer for frequency is 7.143 kHz but in book it is given 7 kHz