blob: ecba03118ff5fed9c7005c4790cf30db1abe1ad4 (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
|
//EXAMPLE 2.9, Generation of a Square wave sequence:
clc;
clear;
clf();
a=gca();
figure(0);
a.x_location="origin";
x=[0:1:80];
y1=sin(x*.05*%pi);
y2=sin(x*.15*%pi);
y3=sin(x*.25*%pi);
y4=y1+y2/3+y3/5;
plot2d3(x,y4,2)
plot(x,y4,'r.')
xtitle('Approximate Square wave','x','y4');
a.children.children.thickness=3;
|