~ubuntu-branches/ubuntu/karmic/scilab/karmic

« back to all changes in this revision

Viewing changes to man/elementary/squarewave.cat

  • Committer: Bazaar Package Importer
  • Author(s): Torsten Werner
  • Date: 2002-03-21 16:57:43 UTC
  • Revision ID: james.westby@ubuntu.com-20020321165743-e9mv12c1tb1plztg
Tags: upstream-2.6
ImportĀ upstreamĀ versionĀ 2.6

Show diffs side-by-side

added added

removed removed

Lines of Context:
 
1
squarewave         Scilab Group         Scilab Function          squarewave
 
2
NAME
 
3
   squarewave -  generates a square wave with period 2*%pi
 
4
  
 
5
CALLING SEQUENCE
 
6
 x=squarewave(t [,%])
 
7
PARAMETERS
 
8
 t          : real vector, time discretization
 
9
            
 
10
 x          : real vector, the wave value at each time point in set
 
11
            (-1,+1)
 
12
            
 
13
 %          : real positive scalar, the percent of the period in which the
 
14
            signal is positive. Defaut value is 50
 
15
            
 
16
DESCRIPTION
 
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. 
 
21
  
 
22
EXAMPLE
 
23
 t=(0:0.1:5*%pi)';
 
24
 plot2d1('onn',t,[2*sin(t),1.5*squarewave(t),squarewave(t,10)])
 
25
SEE ALSO
 
26
   sin, cos  
 
27