From: <HIDDEN>
Newsgroups: comp.soft-sys.matlab
Subject: Re: to open and read a file
Date: Mon, 31 Dec 2012 10:58:27 -0600
Organization: NNTP Server
Lines: 19
Message-ID: <kbsg7j$lav$>
References: <kbs491$9dj$>
NNTP-Posting-Host: W4eUeXSEXdEr7govIpL3/
Mime-Version: 1.0
Content-Type: text/plain; charset=UTF-8; format=flowed
Content-Transfer-Encoding: 7bit
User-Agent: Mozilla/5.0 (Windows; U; Windows NT 5.1; en-US; rv: Gecko/20120306 Thunderbird/3.1.20
X-Notice: Filtered by postfilter v. 0.8.2
Xref: comp.soft-sys.matlab:785685

On 12/31/2012 7:34 AM, Shobana wrote:
> hai....
> "fid = fopen('C:\Users\Public\Downloads\message.txt');
> %S = fscanf(fid,'%s);
> fclose(fid);"
> In the above specified code i am getting error in the fopen statement
> please reply me if anybody knows .Thanks in advance

Use the optional return value to see what the cause of the failure is...

doc fopen

Most likely would be the file isn't where the fully-qualified name is on 
the system on which you're running the code or this isn't an existing 
subdirectory on the system...