Vous êtes sur la page 1sur 1

Using the “ginput” function in MATLAB to find the settling time of a dynamic system

(1) Make the figure window active.

(2) Go back to the Command Window and type

» ginput

(3) Go to the figure window – notice that a set of crosshairs appears that can be moved around by the mouse
(no need to drag).

(4) Align the crosshairs with the point that you want to get the x,y coordinates for.

(5) When you have positioned the crosshairs over the first point (indicated by the green arrow), and click the
mouse. Next, position the crosshairs over the second point (indicated by the red arrow), and click the mouse.
Lastly, hit the “Enter” key.

(6) Go back to the Command Window. The output will look similar to that shown below.

>> ginput
ans =
2.6420 1.9601
5.8266 1.9800

The first line of numbers corresponds to the x,y coordinates of the first point you clicked on, the second line of
numbers correpsonds to the x,y coordinates of the second point that you clicked on.

Vous aimerez peut-être aussi