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

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

LabVIEW 8.5 Help
August 2007

NI Part Number:
371361D-01

»View Product Info

Member of the plots class.

Syntax

[x, y] = ginput

[x, y] = ginput(n)

[x, y, b] = ginput

[x, y, b] = ginput(n)

Description

Acquires data points from the current plot by a mouse click. [x, y] = ginput acquires data points until you press the <Enter> key. [x, y] = ginput(n) acquires data points until LabVIEW acquires n data points or until you press the <Enter> key.

Details

Examples

Inputs

Name Description
n Specifies the number of data points to acquire from the current plot. n is an integer.

Outputs

Name Description
x Returns the x-coordinates of the data points LabVIEW acquires. x is a vector.
y Returns the y-coordinates of the data points LabVIEW acquires. y is a vector.
b Returns the index of the mouse button you press. This function returns 1 when you press the left mouse button and 2 when you press the right mouse button. b is a vector.

Details

This function is not supported in the LabVIEW Run-Time Engine if you request an output from the function. Either do not request an output or remove this function from scripts before you build a stand-alone application or shared library.

Examples

X = 0:0.1:1;
Y = X.*X;
plot(X, Y, 'bo-')
[x, y] = ginput

Related Topics

gtext


Resources


 

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