This might be a really simple question but fopen doesn't seem to like
the concatenated string I'm passing it and spits out an "Invalid
filename" error when in fact the filename does exist. (I tried opening
it explicitly from the command prompt and it worked.)
Can anybody tell me what I may be doing wrong ?
Thanks.
datadirstem ='/xxx/yyy/';
subjs = {'a';'b';'c';}
for i=1:3
fname = strcat(datadirstem, subjs(i),'suffix')
fid = fopen(fname, 'r');
end
|
|