Path: news.mathworks.com!newsfeed-00.mathworks.com!news.kjsl.com!us.feeder.erje.net!feeder.erje.net!eu.feeder.erje.net!news.mixmin.net!aioe.org!.POSTED!not-for-mail
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: Aioe.org NNTP Server
Lines: 19
Message-ID: <kbsg7j$lav$1@speranza.aioe.org>
References: <kbs491$9dj$1@newscl01ah.mathworks.com>
NNTP-Posting-Host: W4eUeXSEXdEr7govIpL3/w.user.speranza.aioe.org
Mime-Version: 1.0
Content-Type: text/plain; charset=UTF-8; format=flowed
Content-Transfer-Encoding: 7bit
X-Complaints-To: abuse@aioe.org
User-Agent: Mozilla/5.0 (Windows; U; Windows NT 5.1; en-US; rv:1.9.2.28) Gecko/20120306 Thunderbird/3.1.20
X-Notice: Filtered by postfilter v. 0.8.2
Xref: news.mathworks.com 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...

--