Re: Calculate with tolerances anyone?
- From: roberson@xxxxxxxxxxxxxxxxxx (Walter Roberson)
- Date: Wed, 30 Jul 2008 18:44:12 +0000 (UTC)
In article <g6p9vu$o8p$1@xxxxxxxxxxxxxxxxxx>,
Daniel Armyr <firstname@xxxxxxxxxxx> wrote:
I work as a system design engineer and now and then I am
faced with measurement values that are not exact, but have a
tolerance attached to them. Since I work with algorithms and
larger systems I often need to process and combine these
numbers through complex formulas.
Now, calculating by hand with tolerances is really a mess
and I was wondering if someone has made a toolkit that helps
out? I am vurrently writing one as the basics are quite
trivial. Before I spend the rest of the week on it, though,
I was wondering is someone has allready beaten me to it.
Maple has range arithemetic. I don't know how much of that range
arithmetic is exposed through the Matlab Symbolic Toolbox; you
might need to use the Extended version of the Toolbox to gain
access to it.
However, range arithmetic in maple is often frustrating to work with,
as each instance of the variable is replaced by the entire variable
range. For example,
x := INTERVAL(2..7);x := INTERVAL(2 .. 7)
evalr(x*(x-1));INTERVAL(2 .. 42)
evalr(expand(x*(x-1)));INTERVAL(-3 .. 47)
which is equivilent to
evalr(x^2 - x);INTERVAL(-3 .. 47)
To understand this result, you have to imagine that the first time that
x is seen, it is replaced by the definite value 2, giving x^2 of 4,
but that when the -x is seen, that it is replaced by the definite value
7, giving x^2-x of 4-7 = -3
evalr((x-3)*x*(x+3));INTERVAL(-70 .. 280)
eval((y-3)*y*(y+3),y=2);-10
If you end up trying to solve for a root over the range, you will
almost certainly get virtual garbage because of this effect. If you
get an answer at all:
solve(x-3);[empty response, whereas the 'proper' response should be x since x
is a range that includes a point at which x-3=0]
The interval arithemetic available via maple is fine for basic
operations in which each variable appears once, not very useful for much
else.
See also an earlier posting of mine on this topic,
http://groups.google.ca/group/comp.soft-sys.matlab/msg/28d15f01c458f7f4
--
"All is vanity." -- Ecclesiastes
.
- Follow-Ups:
- Re: Calculate with tolerances anyone?
- From: Daniel Armyr
- Re: Calculate with tolerances anyone?
- References:
- Calculate with tolerances anyone?
- From: Daniel Armyr
- Calculate with tolerances anyone?
- Prev by Date: Re: count number of
- Next by Date: Re: Question about plot
- Previous by thread: Calculate with tolerances anyone?
- Next by thread: Re: Calculate with tolerances anyone?
- Index(es):
Relevant Pages
|