kato
Junior Member level 3
Hello,
Here it is what I need to do:
I have a file "filesnames.txt" which includes 3 lines of text:
b:\Quick\Take_Trip\S01_Full_band_optimization.hfss
b:\Quick\Take_Trip\R_01_retrieved.OUT
b:\Quick\Take_Trip\R_01_spar.txt
I need to read these three lines (names of files) into Matlab so I can use them to open/close files, i.e. I need to have
fln(1)='b:\Quick\Take_Trip\S01_Full_band_optimization.hfss'
fln(2)='b:\Quick\Take_Trip\R_01_retrieved.OUT'
fln(3)='b:\Quick\Take_Trip\R_01_spar.txt'
so I can do:
a=dlmread(fln(1));
b=dlmread(fln(2));
c=dlmread(fln93));
Yes, I could simply specify these names in the Matlab code too, but I need to be able to change these names very often (different sets of files), so I want to avoid making mistakes in the main code (mixing names without knowing).
I looked everywhere and did not find a satisfactory solution.
Please advise
Thanks
Kato01
Here it is what I need to do:
I have a file "filesnames.txt" which includes 3 lines of text:
b:\Quick\Take_Trip\S01_Full_band_optimization.hfss
b:\Quick\Take_Trip\R_01_retrieved.OUT
b:\Quick\Take_Trip\R_01_spar.txt
I need to read these three lines (names of files) into Matlab so I can use them to open/close files, i.e. I need to have
fln(1)='b:\Quick\Take_Trip\S01_Full_band_optimization.hfss'
fln(2)='b:\Quick\Take_Trip\R_01_retrieved.OUT'
fln(3)='b:\Quick\Take_Trip\R_01_spar.txt'
so I can do:
a=dlmread(fln(1));
b=dlmread(fln(2));
c=dlmread(fln93));
Yes, I could simply specify these names in the Matlab code too, but I need to be able to change these names very often (different sets of files), so I want to avoid making mistakes in the main code (mixing names without knowing).
I looked everywhere and did not find a satisfactory solution.
Please advise
Thanks
Kato01