Filter löschen
Filter löschen

I want to make my program interactive

2 Ansichten (letzte 30 Tage)
tusu
tusu am 18 Dez. 2012
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

Antworten (1)

TAB
TAB am 18 Dez. 2012
  2 Kommentare
tusu
tusu am 19 Dez. 2012
Can anybody give some example..how to use these files
Walter Roberson
Walter Roberson am 19 Dez. 2012
[filename, filepath] = uigetfile('Choose a file');
fullname = fullfile(filepath, filename);
txt_data = fileread(fullname);

Melden Sie sich an, um zu kommentieren.

Kategorien

Mehr zu Migrate GUIDE Apps finden Sie in Help Center und File Exchange

Tags

Noch keine Tags eingegeben.

Community Treasure Hunt

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

Start Hunting!

Translated by