summaryrefslogtreecommitdiff
path: root/656/CH2/EX2.1/example2_1.sce
blob: e2a363f328a1473d220fa4868b7842b1bd794bd0 (plain)
1
2
3
4
5
6
7
8
9
10
11
// current is 2A
//120V
i=2;
v=120;
// v=I*R where R is the resistance in Ohms
r=v/i;
disp("r=")
disp(r)
units='Ohms'
r=[string(r) units];
disp(r)