0

I am implementing uicontrol in matlab as below:

for m = 1: 10

    uicontrol(Fig_handle,'Style', 'pushbutton',...
    'String', sprintf('%s', ImgNames{m,2}),...
    'Tag', sprintf('%s', ImgNames{m,2}),...
    'Value', 0, 'Min',0, 'Max',1,...
    'Units','normalized','Position',[.01+(m-1)/15 .05 .05 .02],...
    'Callback', {@biomarker_Callback});


end

The callback function is:

   function biomarker_Callback(hObject, ~, ~)



  handles = guidata(hObject);


    for m = 1:size(handles.ImgNames)
        checkboxStatus = handles.Fig.(handles.ImgNames{m,2}).Value;
        if checkboxStatus ==1
            imh = imhandles(handles.Fig.screen);


            Image = ind2rgb(handles.Image_adjusted.(handles.ImgNames{m,1}), handles.ImgNames{m,6});
            set(imh,'CData',Image);
        end

    end
    end

On execution, I get this error:

Undefined function 'biomarker_Callback' for input arguments of type 'double'.


Error while evaluating uicontrol Callback

On printing the value of handles.Fig.(handles.ImgNames{m,2}) I get an integer, though I expected columns, with on being that of Value. Also the same thing run of MATLAB R2015b, executes without any fail.

I fail to understand why is this happening. Can somebody help me with this?

Mojo Jojo
  • 369
  • 3
  • 11
  • 31

0 Answers0