Return the current figure handle. If a figure does not exist, create one and return its handle. The handle may then be used to examine or set properties of the figure. For example,
fplot (@sin, [-10, 10]); fig = gcf (); set (fig, "visible", "off");plots a sine wave, finds the handle of the current figure, and then makes that figure invisible. Setting the visible property of the figure to
"on"
will cause it to be displayed again.