summaryrefslogtreecommitdiff
path: root/863/CH2/EX2.9/Ex2_9.sce
blob: 44d5c973be784db230aafad8d7b5bfa35aa0b631 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
//Caption:Determine max and min voltage at which capacitor voltage will settle
//Ex2.9
clc;
clear;
close;
E=20//Peak voltage(in volts)
t=4//Time interval(in ms)
r=3.3//Resistance(in kilo ohms)
c=1//Capacitance(in micro farad)
Emax=E/(1+(2.718^(-t/(r*c))))
Emin=E-Emax
disp(Emin,Emax,'Maximum and minimum voltage(in volts)=')