summaryrefslogtreecommitdiff
path: root/199/CH8/EX8.5/Example_8_5.sce
blob: 6337880a7161b8d9c79d2ef2377456bc8a7dabd8 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
// Chapter8
// Page.No-335, Figure.No-8.25(a)
// Example_8_5
// Output voltage
// Given
clear;clc;
vin=100*10^-3;
t=0:0.1:2*%pi;
i=1;
for t=0:0.1:2*%pi;
  if t<=%pi
    v(i)=vin*sin(t);
    else
      v(i)=0;
    end
    i=i+1;
end
t=0:0.1:2*%pi;
plot(t,v)