square (MathScript RT Module Function)

LabVIEW 2012 MathScript RT模块帮助

版本日期:June 2012

产品编号:373123C-0118

»查看产品信息
下载帮助
(仅限Windows)

Owning Class: waveform generation

Requires: MathScript RT Module

Syntax

s = square(t)

s = square(t, d)

Description

Generates a square wave with period 2*pi.

Examples

Inputs

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.

Outputs

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

Details

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

Examples

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

Related Topics

gensignal
sawtooth

文章是否对您有帮助?

没有帮助