Company Events Academic Community Support Solutions Products & Services Contact NI MyNI

square (MathScript RT Module Function)

LabVIEW 2012 MathScript RT Module Help

Edition Date: June 2012

Part Number: 373123C-01

»View Product Info
Download Help (Windows Only)

Owning Class: waveform generation

Requires: MathScript RT Module


s = square(t)

s = square(t, d)


Generates a square wave with period 2*pi.



Name Description
t Specifies the times at which to plot data for the square wave. t is a vector.
d Specifies the duty cycle percentage of the square wave, or the percentage of high data in the square wave. d is a scalar between 0 and 100. The default is 50.


Name Description
s Returns the square wave at times t with period 2*pi and duty cycle d. s is a vector.


The following table lists the support characteristics of this function.

Supported in the LabVIEW Run-Time Engine Yes
Supported on RT targets Yes
Suitable for bounded execution times on RT Not characterized


X = 0:0.01:6*pi;
Y = square(X, 30);
plot(X, Y)

Related Topics



Your Feedback! poor Poor  |  Excellent excellent   Yes No
 Document Quality? 
 Answered Your Question? 
Add Comments 1 2 3 4 5 submit