Home Messages Index
[Date Prev][Date Next][Thread Prev][Thread Next]
Author IndexDate IndexThread Index

Newbie fopen() question

  • Subject: Newbie fopen() question
  • From: Cingulate <cingulate@gmail.com>
  • Date: Thu, 17 Feb 2005 09:44:24 -0500
  • Newsgroups: comp.soft-sys.matlab
  • Organization: University of Rochester
  • User-agent: Mozilla Thunderbird 0.9 (Macintosh/20041103)
  • Xref: news.mcc.ac.uk comp.soft-sys.matlab:211366
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

[Date Prev][Date Next][Thread Prev][Thread Next]
Author IndexDate IndexThread Index