Path: news.mathworks.com!not-for-mail
From: "Michael Hui" <myhui@yahoo.com>
Newsgroups: comp.soft-sys.matlab
Subject: Re: Fixed-Point Toolbox : ProductWordLength
Date: Fri, 18 Jul 2008 19:04:02 +0000 (UTC)
Organization: Broadcom Corp
Lines: 21
Message-ID: <g5qpf2$gh7$1@fred.mathworks.com>
References: <g5ol12$nrp$1@fred.mathworks.com> <g5pv9g$1vn$1@fred.mathworks.com> <g5qmha$efg$1@fred.mathworks.com>
Reply-To: "Michael Hui" <myhui@yahoo.com>
NNTP-Posting-Host: webapp-02-blr.mathworks.com
Content-Type: text/plain; charset="ISO-8859-1"
Content-Transfer-Encoding: 8bit
X-Trace: fred.mathworks.com 1216407842 16935 172.30.248.37 (18 Jul 2008 19:04:02 GMT)
X-Complaints-To: news@mathworks.com
NNTP-Posting-Date: Fri, 18 Jul 2008 19:04:02 +0000 (UTC)
X-Newsreader: MATLAB Central Newsreader 1388863
Xref: news.mathworks.com comp.soft-sys.matlab:480349



But wait ...

I just tried your demo, and FPT didn't give any overflow
indication at all. So that's no good.

I suppose another solution is to make local copies of all
variables that will be used in more than one equation's RHS,
and set their ProductWordLength to different values.

Or should I use Fixed-Point Block Sets?

The doc gives a good reason for using Embedded MATLAB
Functions, and that reason is exactly why I am using it:

"This capability is useful for coding algorithms that are
better stated in the textual language of the MATLAB software
than in the graphical language of the Simulink product."

Another reason is that a lot of our algorithms are already
in floating point M code, so we benefit from not having to
rewrite that code extensively to convert them to fixed-point.