Path: news.mathworks.com!newsfeed-00.mathworks.com!newsfeed2.dallas1.level3.net!news.level3.com!postnews.google.com!v39g2000pro.googlegroups.com!not-for-mail
From: Rune Allnor <allnor@tele.ntnu.no>
Newsgroups: comp.soft-sys.matlab
Subject: Re: matlab fwrite error
Date: Sat, 3 Jan 2009 13:58:14 -0800 (PST)
Organization: http://groups.google.com
Lines: 13
Message-ID: <f78f3ad5-b36d-4038-b077-ca822f90563f@v39g2000pro.googlegroups.com>
References: <gjoko5$6pl$1@fred.mathworks.com>
NNTP-Posting-Host: 77.17.96.91
Mime-Version: 1.0
Content-Type: text/plain; charset=ISO-8859-1
Content-Transfer-Encoding: 7bit
X-Trace: posting.google.com 1231019894 22940 127.0.0.1 (3 Jan 2009 21:58:14 GMT)
X-Complaints-To: groups-abuse@google.com
NNTP-Posting-Date: Sat, 3 Jan 2009 21:58:14 +0000 (UTC)
Complaints-To: groups-abuse@google.com
Injection-Info: v39g2000pro.googlegroups.com; posting-host=77.17.96.91; 
	posting-account=VAp5gAkAAAAmkCze5hvZtMeedpZWNthI
User-Agent: G2/1.0
X-HTTP-UserAgent: Mozilla/4.0 (compatible; MSIE 6.0; Windows NT 5.1; SV1; .NET 
	CLR 2.0.50727; .NET CLR 3.0.04506.648; .NET CLR 3.5.21022),gzip(gfe),gzip(gfe)
Xref: news.mathworks.com comp.soft-sys.matlab:509703


On 3 Jan, 22:19, "pietro " <bracard...@email.it> wrote:
> i have created that function, but matlab gives me the following error
>
> [B]??? Error using ==> fwrite
> Invalid precision.[/b]
>
> when i called the fwrite. How could i resolve this problem?
...
> fwrite (fid, '%s ; %s ; %s ; %4.0f ;

Try FPRINTF instead of FWRITE.

Rune