How to copy GUI's figure and m-file and rename that to use another version?

4 views (last 30 days)
First of all i made 'A' GUI to simulate. And I want to make another GUI version like from v1 to v2. So my choice is copy A and rename it B. When i was running m-file B, GUI figure B is appeared but it is connected A. I modified some source code on m-file B, but GUI's result is A's result. So i try to find my mistake so searching some keyword like copy, gui, rename on google. But I cant found what is my fault. So i want to know to how to connect GUI figure and m-file after copying.
  1 Comment
Debashis Panda
Debashis Panda on 30 Dec 2016
Hey dear,if you have created the GUI by using GUIDE,then copy the open the .fig file (by right clicking and open as GUIDE)change according to your requirement and go to file change name to B and run it. try it , wish u all the best

Sign in to comment.

Accepted Answer

Image Analyst
Image Analyst on 30 Dec 2016
No, that is not the way to do it, though it might seem like it. Believe me, I do this all the time.
What you want to do is to open your GUIA, then from the pulldown menu, do "File->Save as" and rename it to GUIB. This will make a copy the proper way. The beauty of it is that it doesn't just make a copy of GUIA.fig called GUIB.fig, it will also take GUIA.m and make all the numerous changes that need to be made and automatically save it as GUIB.m
Now you can start making edits to GUIB.m.
Try it and you'll see it works. Like I said, I do this all the time.
  10 Comments
Bachtiar Muhammad Lubis
Bachtiar Muhammad Lubis on 29 Oct 2018
Edited: Bachtiar Muhammad Lubis on 29 Oct 2018
To Image Analyst. Actually you have answered my question, which is your accepted answer by Ki Beom Son. I already opened my GUI yesterday but there weren't anything dropdown menus there until i restart my laptop and the dropdown menus show up. Now i can save the GUI with different name. Thanks a lot Image Analyst !

Sign in to comment.

More Answers (0)

Categories

Find more on Environment and Settings in Help Center and File Exchange

Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!