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

gensignal (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

Syntax

x = gensignal(type, period)

x = gensignal(type, period, duration)

x = gensignal(type, period, duration, interval)

[x, t] = gensignal(type, period)

[x, t] = gensignal(type, period, duration)

[x, t] = gensignal(type, period, duration, interval)

Legacy Name: gensig

Description

Generates periodic signals.

Examples

Inputs

Name Description
type Specifies the type of signal to generate. type is a string that accepts the following values.

'pulse' Generates a periodic pulse.
'sin' Generates a sine wave.
'square' Generates a square wave.
period Specifies the period of the signal. period is a real scalar.
duration Specifies the time duration, in seconds, of the signal. duration is a real scalar. The default is 5 * period.
interval Specifies the time interval, in seconds, between two samples. interval is a real scalar. The default is 0.015625 * period, or period/64.

Outputs

Name Description
x Returns the amplitude of the generated signal. x is a vector.
t Returns the time values of the generated signal. t 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, T] = gensignal('sin', 100, 100, 1)
plot(T, X)


 

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