How to set a path for saving file?

13 ビュー (過去 30 日間)
andrea
andrea 2014 年 12 月 18 日
回答済み: Sean de Wolski 2014 年 12 月 18 日
Hi guys,
Working on my PC I can save an output file.xls in an existing directory called 'output' through the commands:
path_out=['F:\Code\output\'];
file_out=[path_out,'file.xls'];
xlswrite(file_out);
Working on another PC it will give an error (directory not found)? Do I have to change every time the path_out? Is there a more efficient way to find the directory 'output'?
Thanks an advance!

回答 (1 件)

Sean de Wolski
Sean de Wolski 2014 年 12 月 18 日
Some friends
doc pwd % present working directory
doc fullfile % build a full file path
doc uiputfile % let the user choose!

カテゴリ

Help Center および File ExchangeFile Operations についてさらに検索

Community Treasure Hunt

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

Start Hunting!

Translated by