blob: deabf09341708b7cf80a624d9d8447a2077ac623 (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
|
clear//
//Variables
RL = 8.0 //Load resistance (in ohm)
VP = 16.0 //Peak output voltage (in volts)
//Calculation
P = VP**2 / (2 * RL) //Power drawn from the source (in watt)
//Result
printf("\n The power drawn from the source is %0.3f W.",P)
|