summaryrefslogtreecommitdiff
path: root/135/CH3/EX3.31/EX31.sce
blob: d56637e562c91582108c427c2837548457347381 (plain)
1
2
3
4
5
6
7
// Example 3.31: Output voltage
clc, clear
t=[0:0.1:9*%pi];
vin=15*squarewave(t)-5; // Input wave in volts
vo=vin+25; // in volts
plot2d(t,vo,rect=[0,0,9*%pi,40]);
xtitle("Output voltage","t","vo");