summaryrefslogtreecommitdiff
path: root/2297/CH2/EX2.9/Ex2_9.sce
blob: 9294e57259adef5fe45e5e3c9fb5743d5e76ab87 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
// Example 2.9 :time
clc;
close;
format('v',6)
clear;
// given :
v=10;//voltage in volts
r1=500;//resistance in ohms
is=0;//current in amperes
r=700;//resistance in ohms
c=100;//capacitance in micro farads
x=1/(r*c*10^-6);//variable
i=30;//current in mA
y=(i*10^-3)-(v/r1);//variable
t=-((log(y*(r/v))));//time in seconds
t1=t/x;//time in seconds
disp(t1,"time is ,(seconds)=")