opening a fig in different directory

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?

 採用された回答

Azzi Abdelmalek
Azzi Abdelmalek 2013 年 8 月 3 日

0 投票

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

その他の回答 (0 件)

カテゴリ

ヘルプ センター および File ExchangeFile Operations についてさらに検索

Community Treasure Hunt

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

Start Hunting!

Translated by