blob: 13dc21584b5ce50a1de2784997250e1215bd52e4 (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
|
//To calculate current ratings and maximum voltage of a rated resistor.
clc;
clear;
P=1;
R=10*(10^3);
// Using Power Equation and Ohm's Law.
V=sqrt(P*R);
I=sqrt(P/R);
disp('volts',V,'The Maximum voltage of the resistor =')
disp('amperes',I,'The Current rating of the resistor =')
|