1
squarewave Scilab Group Scilab Function squarewave
3
squarewave - generates a square wave with period 2*%pi
8
t : real vector, time discretization
10
x : real vector, the wave value at each time point in set
13
% : real positive scalar, the percent of the period in which the
14
signal is positive. Defaut value is 50
17
squarewave(t) generates the vector of the values of the square wave with
18
period 2*%pi at each date given in the t vector. squarewave(t,%)
19
generates a square wave such that % is the percent of the period in
20
which the signal is positive.
24
plot2d1('onn',t,[2*sin(t),1.5*squarewave(t),squarewave(t,10)])