I am trying to open a series of text files and I am getting the 'Invalid filename' error. This is the code:
[FName,PathName,FilterIndex] = uigetfile('C:\temp\matlab\data','MultiSelect','on');
for f = 1:length(FName)
filename = strcat('C:\temp\matlab\data\', FName(f))
fid = fopen(filename,'rt');
data = fscanf(fid, '%f', 90000 );
This is what I get for filename:
I did some debugging and I can open the files one by one if I put the string literal as the first argument to fopen().
Does this function only take string literals in R2008?
If so, is there a workaround?
Using MATLAB Version 18.104.22.1684 (R2008a)