To terminate input before entering 10 points, press the Return key. Enter data points by pressing a mouse button or a key on the keyboard. Position the cursor with the mouse (or the arrow keys on terminals without a mouse, such as Tektronix emulators). The arguments ‘mouse’ and ‘N’ are optional, with ‘N’ left. The format for ginput is x,y,mouse ginput (N), where (x,y) are the coordinates on the cartesian plane, mouse indicates which mouse button was pressed and N specifies the number of inputs you which to acquire. Pick 10 two-dimensional points from the figure window. This can be done through the use of the command ‘ginput’. I don't know when this function was first introduced it may not have been present when the question was first asked, but I think it bears mentioning even though the question is older. If you select points from multiple axes, the results you get are relative to those axes coordinates systems. One easy way to check the properties of function/user-supplied inputs is to use the validateattributes function. button is a vector of integers indicating which mouse buttons you pressed (1 for left, 2 for middle, 3 for right), or ASCII numbers indicating which keys on the keyboard you pressed. Create an input dialog box that asks users to enter numerical data. Convert a member of the input cell array to a number, using str2num. Returns the x-coordinates, the y-coordinates, and the button or key designation. MATLAB stores the input as a cell array of character vectors. Gathers an unlimited number of points until you press the Return key. x input (prompt) displays the text in prompt and waits for the user to input a value and press the Return key. You can press the Return key to terminate the input before entering n points. The figure must have focus before ginput receives input.Įnables you to select n points from the current axes and returns the x- and y-coordinates in the column vectors x and y, respectively. Ginput (MATLAB Functions) MATLAB Function ReferenceĮnables you to select points from the figure using the mouse or arrow keys for cursor positioning.
0 Comments
Leave a Reply. |
Details
AuthorWrite something about yourself. No need to be fancy, just an overview. ArchivesCategories |