From: "Ben " <>
Newsgroups: comp.soft-sys.matlab
Subject: Re: Compiled Matlab fgets error
Date: Wed, 12 Sep 2012 06:14:09 +0000 (UTC)
Organization: Helsingin Yliopiston Observatorio
Lines: 5
Message-ID: <k2p97h$bh5$>
References: <k2o940$q1o$> <k2oa8k$g25$> <k2p4l7$qf6$>
Reply-To: "Ben " <>
Content-Type: text/plain; charset=UTF-8; format=flowed
Content-Transfer-Encoding: 8bit
X-Trace: 1347430449 11813 (12 Sep 2012 06:14:09 GMT)
NNTP-Posting-Date: Wed, 12 Sep 2012 06:14:09 +0000 (UTC)
X-Newsreader: MATLAB Central Newsreader 3269771
Xref: comp.soft-sys.matlab:778298

Argh, I just realised my message above was in error - I was talking about subdirectories but in the code I posted it had not even reached the part where it explores subdirectories. 

So the code is valid but scratch the bit about directories :)
So then I know the path is good, the file is there, and the code executes file IO on other files from the same dir. 
I tried moving the eeglab toolbox to the same folder as the code I am compiling, but didn't help.