// Examle 4.1 // Reffer the diagram (4.2a) // Using Superpositon theorem I=-0.5; // Source current I1=I*(0.3/(0.1+0.3)); // When 0.5-A Current source is on { by voltage divider } V=80*10^-3; // Voltage source I2=(V/(0.1+0.3)); // When 80-mV voltage source is on { by ohm's law } i=I1+I2; // Current in the circuit { by Superpositon theorem } disp(' Current in the circuit = '+string(i)+' Amp'); // p 105 4.1