MATLAB: Sudden error “Conversion to double from struct is not possible”

figurefigure propertiesgcfMATLAB

The error message occurred suddenly after many successful runs of a script and without altering the line nor any near it. tried in command window and the result was the same. The line appears to be a precise replica of the example line in Matlab help.
>> set(gcf,'WindowState','maximized')
Error using set
Conversion to double from struct is not possible.
The Products box below will not allow me to enter MATLAB
The tags box below will not allow me to enter anything!

Best Answer

You might have assigned a value to a variable named gcf
Or possibly you introduced a new function named gcf
which gcf