title: Error while evaluating figure WindowButtonDownFcn-Undefined function within a matlab guide class
body: <p>The algorithms loads two images and displays it. The user has the option of clicking on either one of the images and dragging  it across the screen. The objective is to give the user the ability to overlay the images.</p>
  
  <p>There are two scripts 1)Main.m and 2)gui_class. Script Main.m contains the gui functions and callbacks. gui_class is designed to load the images and simulates the click that initiates the dragging function of the image.  </p>
  
  <p>Within <code>classdef gui_class &lt; handle</code> 
  lies </p>
  
  <pre><code>properties (Access = private)
          x = [];
          y = [];
  
          c1 = [];
          r1 = [];
          h  = [];
          w  = []; 
  
          gui_h;
  end
      methods
  
          %function - class constructor - creates and init's the gui
          function this = gui_class
  
              %make the gui handle and store it locally
              this.gui_h = guihandles(Main);
               %set the callback functions
  
                  set(this.gui_h.load_image ,'callback' ,@(src, event) load_image_Callback(this, src, event))
          end
      end
  `    methods (Access = private)
  
  
          function this =  load_image_Callback(this, src, event)
              %code loads and displays images here
              %trigger a mouse click
              set(gcf,'windowbuttondownfcn',@(src, event) Mclicked(src, event));
          end
          function Mclicked(this, src, event)
       % get the handles structure
           set(gca,'units','pix') ;
           mousePositionData = get(gca, 'CurrentPoint')
           this.x = mousePositionData(1,1);
           this.y = mousePositionData(1,2);
             %...Perform task
          end
  </code></pre>
  
  <p>I get an error message : Error while evaluating figure WindowButtonDownFcn-Undefined function  within a matlab guide class
  Undefined function 'Mclicked' for input arguments of type 'double'.</p>
  
  <p>Error in gui_class/load_image_Callback/@(src,event)Mclicked(src,event)</p>
  
  <p>How does one correctly call up this function correctly? In addition to that question, why is this occurring?
  I stated in it in main.m as mentioned below:</p>
  
  <pre><code>function Mclicked(hObject, eventdata, handles)
  </code></pre>