1 2 3 4 5 6 7
clc; //ex2.6 Vs=4; //volt Vd=0.7; //volt R1=5100; //ohm IT=(Vs-2*Vd)/R1; //Ampere//KVL int the circuit disp('Ampere',IT*1,"IT=")