From 09:00 PM Friday, August 7 - 10:30 AM CST Saturday, August 8, will be undergoing system upgrades that may result in temporary service interruption.

We appreciate your patience as we improve our online experience.

selectdata (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: plots

Requires: MathScript RT Module (Windows)


[x, y] = selectdata

[x, y] = selectdata(n)

[x, y, b] = selectdata

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

Legacy Name: ginput


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



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


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, 2 when you press the right mouse button, and 3 when you press the middle mouse button. If the mouse contains additional buttons, test this function to determine the value LabVIEW returns when you press those buttons. b is a vector.


The following table lists the support characteristics of this function.

Supported in the LabVIEW Run-Time Engine No (returns error or is ignored)
Supported on RT targets No


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

Related Topics



Not Helpful