title: Matlabs runs wrong script after figure copying
body: <p>I have the following problem. Let us say, we have some GUI written in Matlab. Let it be 
  <code>mygui.fig</code> and <code>mygui.m</code>.</p>
  
  <p>OK, now I want to rewrite this gui and keep prev version of it. So, I copy these two files to <code>mygui_new.fig</code> and <code>mygui_new.m</code>.</p>
  
  <p>We all know, that when we run <code>something.fig</code>, Matlab tries to find <code>something.m</code> in order to perform responses on our actions. However, when I'm trying to run my mygui_new.m, Matlab tries to read scripts from mygui.m giving me warnings like:</p>
  
  <pre><code>Warning: Name is nonexistent or not a directory: ..\..\matlab\PostProcess\ 
  
    In path at 110
    In addpath at 87
    In mygui at 22
    In @(hObject,eventdata)SemiSuperviseTool_main('video_name_popupmenu_CreateFcn',hObject,eventdata,guidata(hObject))
    In graphics/private/hgloadStructDbl at 95
    In /usr/local/MATLAB/R2013a/toolbox/matlab/graphics/hgload.p&gt;hgload at 70
    In openfig at 72
    In gui_mainfcn&gt;local_openfig at 286
    In gui_mainfcn at 159
    In mygui_new at 46
  </code></pre>
  
  <p>So, we see that Matlab is really starting from my new version of script, but then for some reason tries to load an old one. If I delete old files at all, GUI will not run.</p>
  
  <p>Here is another my post:
  <a href="https://stackoverflow.com/questions/21849773/no-breakpoints-after-gui-figure-copying">No breakpoints after gui figure copying?</a></p>
  
  <p>The solutions I've described there doest not work here.</p>
  
  <p>Any ideas?
  Thanks!</p>