fopen / doesnt work with whole file path ?

5 ビュー (過去 30 日間)
Max Müller
Max Müller 2014 年 9 月 27 日
コメント済み: Image Analyst 2014 年 9 月 27 日
Hey Guys, why doesnt fopen work with the whole filepath ?
Does not work
afs/ipp-garching.mpg.de/home/e/e119/MatLabGUI/Prototyp/seth_plots/seth_31050.dat
works perfect
seth_plots/seth_31050.dat
I currently use matlab in the fodler: Prototyp.

採用された回答

Image Analyst
Image Analyst 2014 年 9 月 27 日
That's not the whole file path - it's a relative path. It probably goes off the current folder and you don't have an afs folder in the current folder. Just specify the whole path, starting from the drive letter, or make sure that folder tree structure is contained in the current folder, and you should be fine.
  3 件のコメント
Max Müller
Max Müller 2014 年 9 月 27 日
got it pwd
Image Analyst
Image Analyst 2014 年 9 月 27 日
Try this snippet:
% Get the name of the file that the user wants to save.
% Note, if you're saving an image you can use imsave() instead of uiputfile().
startingFolder = userpath
defaultFileName = fullfile(startingFolder, '*.*');
[baseFileName, folder] = uiputfile(defaultFileName, 'Specify a file');
if baseFileName == 0
% User clicked the Cancel button.
return;
end
fullFileName = fullfile(folder, baseFileName)

サインインしてコメントする。

その他の回答 (0 件)

カテゴリ

Help Center および File ExchangeLow-Level File I/O についてさらに検索

Community Treasure Hunt

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

Start Hunting!

Translated by