summaryrefslogtreecommitdiff
path: root/135/CH3/EX3.31/EX31.sce
diff options
context:
space:
mode:
Diffstat (limited to '135/CH3/EX3.31/EX31.sce')
-rwxr-xr-x135/CH3/EX3.31/EX31.sce7
1 files changed, 7 insertions, 0 deletions
diff --git a/135/CH3/EX3.31/EX31.sce b/135/CH3/EX3.31/EX31.sce
new file mode 100755
index 000000000..d56637e56
--- /dev/null
+++ b/135/CH3/EX3.31/EX31.sce
@@ -0,0 +1,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"); \ No newline at end of file