MATLAB: While using resting state fmri toolkit version 1.7 for ALFF calculation,getting an error in rest progress..Input arguments of type matlab.ui.Figure not valid.

alffrest v1.7

Error using rest_progress (line 29) Input arguments of type matlab.ui.Figure not valid. 29#line, rest_progress, in "D:\RealignParameter\REST_V1.7_120101\REST_V1.7_120101\rest_progress.m" 76#line, rest_waitbar, in "D:\RealignParameter\REST_V1.7_120101\REST_V1.7_120101\rest_waitbar.m" 50#line, rest_to4d, in "D:\RealignParameter\REST_V1.7_120101\REST_V1.7_120101\rest_to4d.m" 34#line, alff, in "D:\RealignParameter\REST_V1.7_120101\REST_V1.7_120101\alff.m" 333#line, btnComputeAlff_Callback, in "D:\RealignParameter\REST_V1.7_120101\REST_V1.7_120101\alff_gui.m" 95#line, gui_mainfcn, in "C:\Program Files\MATLAB\MATLAB Production Server\R2015a\toolbox\matlab\guide\gui_mainfcn.m" 33#line, alff_gui, in "D:\RealignParameter\REST_V1.7_120101\REST_V1.7_120101\alff_gui.m" >>

Best Answer

That code was designed for R2014a or before. If you look at line 25 of the source of rest_progress.m at http://resting-fmri.sourceforge.net/Publish_REST_html/rest_20080302.0722/rest_progress.html you will see
elseif isnumeric(whichbar)
however, graphic object handles are no longer numeric. The test should be at least
elseif isnumeric(whichbar) || ishghandle(whichbar)
It would not surprise me if there are other places in the code that assume some things about graphics that are no longer true.