Path: news.mathworks.com!not-for-mail
From: "pietro " <bracardi82@email.it>
Newsgroups: comp.soft-sys.matlab
Subject: Re: matlab fwrite error
Date: Sat, 3 Jan 2009 22:21:02 +0000 (UTC)
Organization: The MathWorks, Inc.
Lines: 16
Message-ID: <gjoocd$20v$1@fred.mathworks.com>
References: <gjoko5$6pl$1@fred.mathworks.com> <f78f3ad5-b36d-4038-b077-ca822f90563f@v39g2000pro.googlegroups.com>
Reply-To: "pietro " <bracardi82@email.it>
NNTP-Posting-Host: webapp-05-blr.mathworks.com
Content-Type: text/plain; charset="ISO-8859-1"
Content-Transfer-Encoding: 8bit
X-Trace: fred.mathworks.com 1231021262 2079 172.30.248.35 (3 Jan 2009 22:21:02 GMT)
X-Complaints-To: news@mathworks.com
NNTP-Posting-Date: Sat, 3 Jan 2009 22:21:02 +0000 (UTC)
X-Newsreader: MATLAB Central Newsreader 1184971
Xref: news.mathworks.com comp.soft-sys.matlab:509705


Rune Allnor <allnor@tele.ntnu.no> wrote in message <f78f3ad5-b36d-4038-b077-ca822f90563f@v39g2000pro.googlegroups.com>...
> 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

thank you, now it works. Could you explain me, why it doesn't work with fwrite?