MATLAB: Am I unable to I edit a MATLAB 5.3.x (R11.x) GUI using GUIDE in MATLAB 6.x (R12.x)

editguiguideMATLABmodifyoldr11r12

I have several GUIs which I created in MATLAB 5.3 (R11), and since I now have installed R12, I would like to be able to implement and edit them there. The problem is that when I try to invoke an R11 GUI while in R12, and then use the GUIDE command like I did in R11, I am not able to edit the old GUI.

Best Answer

  • In order to take a figure created in MATLAB 5.3 (R11) and edit it in MATLAB 6 (R12), you have to call the GUI from the R12 command line. This will open a figure window with your R11 figure in it. While the figure is open, you then use the command:
    guide(gcf)
    This will allow R12 to take hold of the current figure (your R11 figure). You may then edit your figure right in the R12 GUIDE window. When you go to save the modified figure, you will notice that the file extension will be changed to .fig. The .fig file in R12 is a combination of the information which was previously stored (in R11) in the .m and .mat files that were created whenever a new figure was saved. Therefore, in R12, .m and .mat files are no longer created when a figure is made. Instead, one .fig file is created.
    To open the GUI in R12, use the OPEN command on the .fig file. If the GUI has multiline callbacks, see the Related Solution.
  • Related Question