summaryrefslogtreecommitdiff
path: root/2279/CH3/EX3.10/Ex3_10.sce
blob: 08efe6700455893c6d252e2319a0b577ff63120c (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
//Example 3.10
clc
clear all
t=0:0.01:20;
function y=signal(x)
    y=x
endfunction
//Assume v(t) as ramp signal
v1=t;
v2=t+2;
//Assume R=1
i1=signal(v1)
i2=signal(v2)
a=2;
b=2;
subplot(4,2,1)
plot(t,a*v1)
xtitle("a*v1(t)","t in sec","a*v1(t)");
subplot(4,2,2)
plot(t,signal(a*v1))
xtitle("a*i1(t)","t in sec","a*i1(t)");
subplot(4,2,3)
plot(t,b*v2)
xtitle("b*v2(t)","t in sec","b*v2(t)");
subplot(4,2,4)
plot(t,signal(b*v2))
xtitle("b*i2(t)","t in sec","b*i2(t)");
c=(a*v1)+(b*v2);
subplot(4,2,5)
plot(t,c)
xtitle("v3(t)","t in sec","v3(t)");
subplot(4,2,6)
plot(t,signal(c))
xtitle("i3(t)","t in sec","i3(t)");
subplot(4,2,8)
plot(t,signal(a*v1)+signal(b*v2))
xtitle("LINEAR SYSTEM","t in sec","a*i1(t)+b*i2(t)");