Company Events Academic NI Developer Zone Support Solutions Products & Services Contact NI MyNI

gensig (MathScript Function) (Windows, Not in Base Package)

LabVIEW 8.5 Help
August 2007

NI Part Number:
371361D-01

»View Product Info

Member of the waveform generation class.

Syntax

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

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

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

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.
interval Specifies the time interval, in seconds, between two samples. interval is a real scalar. The default is 0.015625, or 1/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.

Examples

[X, T] = gensig('sin', 100, 100, 1)
plot(T, X)


Resources


 

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