opening a fig in different directory

11 views (last 30 days)
hi. I have two .fig files: for example fig1 and fig2. fig2 is in a folder for example folderfig2. this folder is beside fig1. I want to open fig2 by clicking a push button in fig1. I should make this program exe so it dosnt have specified directory. what should I do?

Accepted Answer

Azzi Abdelmalek
Azzi Abdelmalek on 3 Aug 2013
When you want to use any file you have to specify the name of the file and its location. example
folder='E:\matlab'
filename='fig1.fig'
ful_file=fullfile(folder,filename)
Then use ful_file

More Answers (0)

Categories

Find more on File Operations 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!