title: uigetfile from GUI in Matlab
body: <p>I'm trying to import data into a GUI and save it to <code>handles</code>. The .mat-file contains a single struct called  <code>log</code> with all the data in it. I've made a button using GUIDE and added the following code: </p>
  
  <pre><code>function loadMatFileButton_Callback(hObject, eventdata, handles)
  [FileName,PathName] = uigetfile('*.mat');
  loadDataName = fullfile(PathName,FileName);
  load(loadDataName); % gives log struct
  
  handles.log = log;
  </code></pre>
  
  <p>But when executing I get this error:</p>
  
  <pre><code>??? Error using ==&gt; log
  Not enough input arguments.
  
  Error in ==&gt; VisualizeData&gt;loadMatFileButton_Callback at 160
  handles.log = log;
  </code></pre>
  
  <p>It's really weird. I've tried debugging it by putting a breakpoint after the <code>load</code> command. When I then type <code>handles.log = log</code> manually in the console, it does works... I don't understand what's going wrong, but it must be really trivial.</p>