MATLAB: Ginput doe not work anymore

ginput

[TrajX, TrajY] = ginput;
this has worked great but now does not work at all. I click mouse to select a region — with simultaneous press of shift, or without — and I get nothing. What is the problem? I have checked the Matlab help and documentation, but no clue how to use it

Best Answer

From the documentation: "[x,y] = ginput gathers an unlimited number of points until you press the Return key."
Did you press the Return key after clicking in the axes one or more times? The ginput function won't return, and won't assign any values to the outputs with which you called it, until you do.
Related Question