I want to make my program interactive
1 回表示 (過去 30 日間)
古いコメントを表示
Hiee
I have a program which starts with agiven file name as a input...
my code starts with
txt-data = fileread('F:\data.txt'); ................. .......... ......
I want that when I run my program it should ask for the path for the file name or the file itself...and any user has to give that,,how can i do that without not changing the path name in program every time
0 件のコメント
回答 (1 件)
TAB
2012 年 12 月 18 日
2 件のコメント
Walter Roberson
2012 年 12 月 19 日
[filename, filepath] = uigetfile('Choose a file');
fullname = fullfile(filepath, filename);
txt_data = fileread(fullname);
参考
カテゴリ
Help Center および File Exchange で Dialog Boxes についてさらに検索
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!