summaryrefslogtreecommitdiff
path: root/165/CH13/EX13.1/ex13_1.sce
blob: 0e0d5c4f737b6ca791ce9201b2b2ebfdf9041822 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
//Example 13.1
clc;

R=5000;       //Total resisrence of POT
Vt=5;         //Potential applied
ssl=3;        //Shaft stroke length in inches
w_at=0.9;     //wiper is at 0.9 inch
//value of R2
R2=w_at*R/ssl;
R1=R-R2;      //Given R = R1 + R2
Vo=Vt*R2/(R1+R2);
printf('\nValue of output voltage is %.2f V\n',Vo)