file management
2 ビュー (過去 30 日間)
古いコメントを表示
I need to ask the user to enter the input file name. Make them repeat until an existing file is found.
please help Im not sure how to do this i am new to managing files with matlab
回答 (1 件)
Honglei Chen
2012 年 3 月 12 日
You can use dir to read in the file listing in the current directory. Then you can use input to get the the file name from command line. If the specified file name is in the file listing, proceed; otherwise, ask a different file name again.
doc dir
doc input
Alternatively, you can use uigetfile to ask the user to choose a file.
doc uigetfile
0 件のコメント
参考
カテゴリ
Help Center および File Exchange で File Operations についてさらに検索
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!