blob: 44210f90d230fd856c2c05ea666a865f55ffaf23 (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
|
//Example 16_1 page no:739
clc;
//given
I1=1;//here I1 is assumed to 1 hence it will cancel out in simplifications
I2=1;//here I1 is assumed to 1 hence it will cancel out in simplifications
V1=6*I1;
V2=5*I1;
function [x] = frac(n, d)
x = (n*%s)/(d*%s);
endfunction;
x=frac(V1,V2);
disp(x,"the parameter A is");
x=frac(I1,V2);
disp(x,"the parameter C is");
V1=-17;
I2=5;
x=frac(-V1,I2);
disp(x,"the parameter B is");
V1=-7;
I2=5;
x=frac(-V1,I2);
disp(x,"the parameter C is");
|